tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Todd O'Bryan" <>
Subject session sharing for multiple webapps
Date Mon, 19 Jan 2004 21:46:59 GMT
I've googled and googled and I can't find what I'm looking for.

I'd like to deploy several small webapps that share a login method. 
(Several small ones, because I teach high school and my students will 
be working on them. I'd prefer to break only small amounts of 
functionality at any one time rather than the whole website.) 
Unfortunately, access to the individual servlets is fairly fine-grained 
and not amenable, at least as far as I can tell, to the built-in single 
login functionality. (For example, I have "/info/login.html" set to use 
the Info servlet, but only administrators or the login that's being 
accessed should be able to access the information. In the first few 
lines of the servlet, I use the session to determine the login and 
either accept or reject the request. Since every role should have 
access to the Info servlet, but not every user should be able to access 
all the information available from it, I don't know how the built-in 
access method helps me. If I'm mistaken, I'd love to here about it, 

There's a pair of messages on an archive that mention sticking a 
singleton in $CATALINA_HOME/shared/lib or $CATALINA_HOME/common/lib to 
maintain sessions across multiple webapps, but they go no farther than 
mentioning it. Does anybody have a pointer with more information about 
how exactly to do this? I've been sticking a User object in the session 
which allows me easy access to login, role, etc., and I'd love to be 
able to continue doing that and share that user info between multiple 
webapps in the same container.

If this hasn't been fleshed out anywhere that's publicly accessible, 
would someone like to flesh it out for me and posterity? Or talk me out 
of it. I'm open at this point...

Todd O'Bryan

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message