Sending the Session
I am currently doing a system on Google App Engine and am very new to it, I am developing using the Java plattform . I have a problem about sending the session object between servlets. I have already enabled sessions on the appengine.webxml开发者_StackOverflow社区. I can send the session object from my login page to a VIEW page but after which the session object cannot be passed any longer.
Any possible answers?
You do not need to "pass" a session object from one Servlet to another. The session object can always be retrieved via the HttpServletRequest
e.g. like this HttpSession session = request.getSession();
. In JSPs (I guess that's your view technology) you can access the session via the implicit variable session
.
To make sure your session doesn't expire to early set an appropriate value for <session-timeout/>
in your web.xml
.
精彩评论