×

Loading...

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.
(#12525@0)
2000-10-30 -04:00
This post has been archived. It cannot be replied.
Page address has been copied. To share, click to copy page address.
Share Online by QR Code

Back To Topic: How can JSP page get correct session object?

Back To Forum: HOME枫下论坛枫下论坛主坛工作学习IT技术讨论