tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <>
Subject Re: Session scope problem
Date Fri, 28 Sep 2001 01:37:54 GMT

On Thu, 27 Sep 2001, paul wrote:

> Date: Thu, 27 Sep 2001 11:08:24 +0100
> From: paul <>
> Reply-To:
> To:
> Subject: Session scope problem
> Is it true that the session object is only valid in a given context/Web app
> which means that if you change context you lose all your stored objects.
> ..very annoying..why?
> Surley a seesion is one browser one server irrespective of the pages
> visited.

Not if you are talking to multiple web applications.  See the servlet
specification for details:

Remember that each web application is loaded from a separate class loader,
and the classes in web app #1 cannot see the classes in web app #2.
Therefore, any session attributes you created in #1, but tried to access
in #2, would through ClassNotFoundException errors.

If you really want the same session state to apply to all of your
"applications", make sure that they are all packaged into a single web

> Thanks

Craig McClanahan

View raw message