|
|
|||
HttpSession in JSP when using forward(Request, Response)
Something i'm not understanding. I have two JSP pages, index.jsp that submits to servlet A and result.jsp that gets the (request, response) through RequestDispatcher from servlet A. In servlet A, i get a session from HttpSession and set its attribute with a user name parameter i get from index.jsp.
When i test above application with Internet Explorer cookies disabled by writing this simple line of code <%= session.getAttribute("username")%> in the result.jsp, the result.jsp page shows me the input from the index page? how so? shouldn't the output from the result.jsp page be null because cookies were disabled and i didn't use URL rewriting!! I was experimenting with this yesterday and instead of forwarding the (request, response) to the JSP, I used the PrintWriter inside my servlet and the result.jsp showed null!? 2 Replies |
|||
|