Exchange session between WAR

Is it possible for the session data of one war file to be shared by another war file.

+6
servlets session jsf
source share
3 answers

Essentially, you just need to somehow configure the server to store the session in a cookie without a path. In the case of Tomcat, you can simply set the emptySessionPath attribute of the <Connector> element to true in /conf/server.xml . Also see this Tomcat configuration link .

 <Connector ... emptySessionPath="true"> 

This, however, affects all webcams deployed on the same server.

Refresh . Since you are actually using Websphere (which uses Tomcat under the hoods), you need to modify the Tomcat connector in Websphere config.xml to include the following attribute:

 <attribute name="emptySessionPath">true</attribute> 
+3
source share

This is not easy to do. but I was able to do this with tomcat. Here is the link http://www.fwd.at/tomcat/sharing-session-data-howto.html I'm not sure which server you are using. Also, why do you need this, there may be another solution depending on what you need to do.

+2
source share

Tomcat has a Valve-Sign-On Valve :

Single Sign On Vale is used when you want to give users the opportunity to subscribe to any of the web applications associated with your virtual host, and then identify their identity with all other web applications on the same virtual host.

You can also try implementing a one-time use of cookies (although this has security flaws).

+1
source share

All Articles