This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Servlets and the fly likes Session between two WAR files in Websphere 4.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Session between two WAR files in Websphere 4.0" Watch "Session between two WAR files in Websphere 4.0" New topic
Author

Session between two WAR files in Websphere 4.0

sucheta gautham
Greenhorn

Joined: Jul 14, 2002
Posts: 3
According to Servlet spec 2.2/2.3 a Session must be scoped at context level in our scenario it is at a WAR file level.
I am trying to track Session in 2 servlets a/c 2 WAR files and it fails. I am using Session object.
Is there a work around to this solution apart from using Cookies?.


Sucheta
Jessica Sant
Sheriff

Joined: Oct 17, 2001
Posts: 4313

The servlet 2.3 spec also requires that a WebApplication have a 1 to 1 relationship with a Servlet Context -- meaning that session can not be shared across Web Applications. (See SRV 9.2)
If you want to share information across Web Apps -- you'll need to do it on your own, through Cookies or through request parameters.
But if you need to share information between to web apps -- why not just make them a single web app?
Frank Carver
Sheriff

Joined: Jan 07, 1999
Posts: 6920
Jessica wrote: through Cookies or through request parameters.
Or, indeed, by using any other form of communication you might use between two regular applications: a database, shared files, JNDI, JMS, etc.


Read about me at frankcarver.me ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Session between two WAR files in Websphere 4.0
 
Similar Threads
war files in the same Application server - Session ?
Loading multiple log4j.xml files
WAR files can be signed?
Sharing Session between Two WAR Files
Mutiple war files from single POM