> I have a tomcat webapp that is comprised of a lot of one-shot,
> context-free servlets. The only context they need is the security (ie
[quoted text clipped - 22 lines]
> All suggestions gratefully received.
> Roger
There's not necessarily a correlation between a user's authentication
and their session; i.e. you can have a session without authentication,
and authentication without sessions.
Typically in form-based authentication, the username is stored in the
session. Some containers serialize the session during shutdown/restart,
which would make the session available to clients after a server cycle.
Likewise, in HTTP basic authentication, the client sends credentials
with every request (so a server cycle would be transparent to the client
with respect to authentication, since each request carries the
authentication credentials).
As far as Tomcat is concerned see:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/manager.html
This gives instructions on enabling persistent sessions.
Roger - 22 Dec 2003 19:28 GMT
Thanks, that helps a lot. I have been ignoring the 'manager' docs
thinking they were not relevant. I notice that the .ser files are used
to handle restarts. This might actually do enough of what I need for
now, if I just flag my manager to be distributable I ought to get most
of what I want.
Longer term I think I have to implement my own manager and make it
'semi' persistent. The persistent manager doesn't work quite how I
want. It is, of course, designed to store session data and it must
write to the persistence store every time a request is completed. In
my case I just want to remember that this user logged on and got some
privs assigned. All of this is static for the duration of the session,
so I don't need to write it all the time.