开发者

give me meanging of above things [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 12 years ago.

meaning of request.getSession().setAttribute(),response.setHeader("Content-Disposition", "attachment;filename=\"Destination.csv\"");,response.getOutputStream();,out.println(开发者_如何学JAVA) and why use request.getSession().setAttribute()

my code for related it is request.getSession().setAttribute("lcrConfigProductionRelData",lcrConfigProductionRelData); lcrConfigProductionRelData is collection and this code present in jsp and it access in servlet servletCode is (httpSession.getAttribute("lcrConfigProductionRelData");


  • request.getSession() returns the session.

  • .setAttribute("lcrConfigProductionRelData",lcrConfigProductionRelData); sets the field with the given name to the given value.

  • response.setHeader("Content-Disposition", "attachment;filename=\"Destination.csv\""); sends a HTTP header causing the user's to show a download window with a file name "Destination.csv

The session attribute is set so it can be accessed somewhere else just through its name without direct access to the original variable.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜