give me meanging of above things [closed]
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.
精彩评论