tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lightbulb432 <>
Subject Implementing HttpSession
Date Thu, 04 Oct 2007 03:35:25 GMT

Rather than using Tomcat's own HttpSession, I may be implementing HttpSession
to write to shared storage or to the client. (Or if for no other reason,
then to learn something.)

Do you know of any HttpSession implementations that are publicly available,
as the task of storing session state in places other than web server memory
is common enough that I'd hope others have already done so? A quick web
search didn't reveal anything too exciting.

There are a couple of methods I'm having trouble understanding how to
implement. The first is isNew(). Looking through the StandardSession code, I
can't tell exactly when to set this to true and false - all I know is that
initially upon session creation on the server (e.g. in
ManagerBase.createSession()), the "new" property is set to true. In what
cases is it set to false, and how would a web application developer use this

How can you tell Tomcat to use your implementation of HttpSession, so that
when you call request.getSession(), it returns that object?

In the above case, would Tomcat take care of calling setMaxInactiveInterval
and providing a value for getServletContext()?

View this message in context:
Sent from the Tomcat - User mailing list archive at

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message