| Author |
Getting another context (or Sharing session between contexts)
|
Maerch Skirsen
Greenhorn
Joined: Aug 14, 2008
Posts: 2
|
|
Heyja,
I want to use more than one WebApplications because of modularity. The problem is, that i need to migrate the sessions between them. I found a promising howto at this site, which (short explanation) stores a map as an attribute in a context of an app. In this map the key is the session id and the value the session.
Now i start to play with contexts and try the following example (i tried Tomcat 5.5 and 6.0 as well):
My first app, called FirstApp and stored as /webapps/FirstApp/index.jsp
My second app, like my first, but as /webapps/SecondApp/index.jsp
Unfortunately the context is always null. I found several sites like this that explain that i have to activate this feature for tomcat.
So i tried to add ...
in /config/context.xml and in /config/server.xml but nothing leads to success. So i am not sure if this is a Tomcat issue. Maybe its more my own code. What do you think? Or is there maybe another and better way to solve my issue as through contexts.
Thank you in advance
Maerch
|
 |
Maerch Skirsen
Greenhorn
Joined: Aug 14, 2008
Posts: 2
|
|
OK, i found a way which works on Tomcat 6.0.
Create a file context.xml with the following content
and put it in the META-INF folder. After a Tomcat restart it should work. With this you can easily share sessions between contexts like on the side above is described. Have fun. I will have. :-)
|
 |
 |
|
|
subject: Getting another context (or Sharing session between contexts)
|
|
|