On Tue, 13 Mar 2001, Craig R. McClanahan wrote:

> On Tue, 13 Mar 2001, Milt Epstein wrote:
> 
> > On Fri, 9 Mar 2001, Richard Yumul wrote:
[ ... ]
> > > I guess what I really am asking is it possible to share the
> > > HttpSession object between web apps?
> > 
> > Not really sure on this -- I think there may be some complications in
> > trying to do this.  I have seen some discussion of this on another
> > servlet-related list I'm on -- servlet-interest, run by Sun.  You
> > might check there -- you can access the archives from:
> 
> No, it is not possible to share session attributes between web apps.
> This is specifically prohibited in the spec.  To understand why,
> think about what happens when webapp A loads a class from its own
> WEB-INF/classes directory and stores it as a session attribute.
> Now, let's assume that the container allowed you to reference the
> session from webapp B -- if you try to access that session
> attribute, you would get either ClassNotFoundException (because the
> class is not visible to webapp B's class loader) or
> ClassCastException (because a class "foo" loaded from webapp A's
> class loader is not the same as a class "foo" loaded from webapp B's
> class loader).
> 
> Tomcat 4.0 includes optional "single sign on" support that allows a
> user to authenticate themselves once across a set of cooperating web
> applications on the same virtual host.  However, the user still ends
> up with a session on each web application.

OK, that answer that question.  Still, like I said, there's been some
discussion of such things on the servlet-interest list, and depending
on exactly what you (i.e. Richard Yumul) are trying to do, you might
find it helpful to take a look at that.  Here's the URL for the
servlet-interest archives again:

http://archives.java.sun.com/archives/servlet-interest.htm

Milt Epstein
Research Programmer
Software/Systems Development Group
Computing and Communications Services Office (CCSO)
University of Illinois at Urbana-Champaign (UIUC)
[EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to