First of all, it seems there is a typo in your servlet code. "request," instead of "Request".
As I used the dispatcher, I found I must be extremely careful in
putting URL for the destination page. "myjsp.jsp" or "/myjsp.jsp"? This is a place where the problem can arise.
I hope you won't get trouble here. Actually, I cannot remember which one is the corect syntax!
In the Servlet code, as you used dispatcher, you have forwarded request and response to the JSP page. In turn, session is associated with request.... so you have luxury in the JSP page to retrieve the items you have bound in session some time earlier.
As I used the dispatcher, I found I must be extremely careful in
putting URL for the destination page. "myjsp.jsp" or "/myjsp.jsp"? This is a place where the problem can arise.
I hope you won't get trouble here. Actually, I cannot remember which one is the corect syntax!
In the Servlet code, as you used dispatcher, you have forwarded request and response to the JSP page. In turn, session is associated with request.... so you have luxury in the JSP page to retrieve the items you have bound in session some time earlier.