tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Todd O'Bryan" <toddobr...@mac.com>
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, 
though.)

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...

Thanks,
Todd O'Bryan


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message