Session between WAR files

hello,

I am asking a question, however I still did not try it out (just being onest).

Would a session variable work between two WAR files?

For-example: Imagine I have WAR file A, that have a link to page WAR file B. Will the page in WAR file B have access to the session variables set by WAR file A?

--

As I maybe said more then once. I want to develop a website in a modularized way. I want to have the basic structure of the website in one WAR file, and then have the other sections to be loaded inside an other WAR file.

I realized that most of the websites on the internet just make a clear cut of reporoducing the common parts in the other WAR files. However this is something I would like to avoid, since I feel it is wrong. However is this the only way how this can be done?

I have searched a lot on the internet, but can not find a lot of examples! :(

thanks and regards,

sim085

[948 byte] By [sim085a] at [2007-10-2 20:11:55]
# 1

No, I don't think you'll find sessions being shared between different webapps.

The assumption tends to be that webapps are developed independantly, and might have conflicting session attribute keys. Details of session behaviour are in the web.xml file associated with each app, they can have different expiry times etc..

I've shared data between webapps using my own cookies and common classes rather than using session.

malcolmmca at 2007-7-13 22:52:32 > top of Java-index,Java Essentials,Java Programming...
# 2
thanks malcolmmc,I think the cookie thing is the best solution, altough some people do disable cookies sometimes.thanks :)regards,sim085
sim085a at 2007-7-13 22:52:32 > top of Java-index,Java Essentials,Java Programming...