tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From A Sunley <>
Subject Single Sign-On across multiple webapps
Date Sun, 23 Sep 2007 17:02:05 GMT

Greeting Tomcat gurus,

I'm experiencing some problems implementing SSO across two webapps.
Basically we have a main website which presently uses FORM authentication
with a JAASRealm – this works fine for the website. However we now want to
add a forum, specifically JForum ( ) as it supports SSO.
Ideally we want to install it as a separate webapp.

By default JForum supports SSO by calling request.getRemoteUser(). But if
the user is authenticated in the first webapp.

For the main website we have context.xml in website/META-INF/, with
crossContext enabled and the JAASRealm specified. A quick note about the
JAAS setup, I don't know whether this has any implications regarding SSO - 
The JAASRealm has useContextClassLoader set to false, therefore the
LoginModule is a class of the website, not a .jar in the Tomcat shared

With crossContext enabled in the main webapp, calling getRemoteUser() in the
jforum webapp returns null and I'm not sure why. 

Essentially my question is how do I enable cross-context sessions?  Indeed,
if I set a session attribute in one webapp, how do I access it in from
another webapp period? 

Is this the way to do it:

Set attribute in webapp1:

Access attribute in webapp2:

Thanks for your time.

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