Regarding session management and dispatcher

jabber (jabber)
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.

2000-10-30 -04:00

回到话题: How can JSP page get correct session object?

回到论坛: HOME枫下论坛枫下论坛主坛工作学习IT技术讨论