aspose file tools*
The moose likes Websphere and the fly likes Http session is getting lost in Websphere when proxy sever is used Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "Http session is getting lost in Websphere when proxy sever is used" Watch "Http session is getting lost in Websphere when proxy sever is used" New topic
Author

Http session is getting lost in Websphere when proxy sever is used

pavan kk
Greenhorn

Joined: Jul 28, 2010
Posts: 3

We have two web Applications , each one is deployed on seperate websphere application server. Both of these websphere Application server is fronted by
an Apache proxy server , So request is routed from the proxy server to the websphere application server. we have proxy mapping for both the applications ,

problem :
_______

when we open a jsp page of the 2nd aplication from the first web application in a child window through (window.open) the session of 1st web application , is getting
killed.
This is not happening when two web applications are deployed seperately on Tomcat and fronted by a apache proxy server. I think its something todo with
websphere settings .

for your information , we are using websphere 6.1 as our application server, and apache 2.2 as our proxy server

and we have the following mappings in our apache httpd.conf file

ProxyPass /firstWebApp http:/machine1:9080/firstWebApp
ProxyPassReverse/firstWebApp http:/machine19080/firstWebApp

ProxyPass /secendWebApp http:/machine2:9080/secendWebApp
ProxyPassReverse/secendWebApp http:/machine2:9080/secendWebApp


and the apache proxy server is running on machine1.

Thanks
pavan

pavan kk
Greenhorn

Joined: Jul 28, 2010
Posts: 3
after debugging this issue we found some more details about the problem , the http session is not getting killed , to confirm this we have added HttpSessionListener
to verify when the session getting destroyed , but the destroy() method has never get called even after it creates a new HttpSession. So only the browser is losing its reference to that old session, and we have session timeout for 30 minutes , after this time the session destroy() method is getting called for the old session. I hope this additional information will be helpful .

Eagerly looking for some help in this direction.

Thanks
Pavan

Deepak Pant
Ranch Hand

Joined: Feb 13, 2004
Posts: 443
I can suggest you one thing to try. By default the name of the cookie dropped is JSESSIONID. Try changing the name of the cookie for both the web apps and see if the problem goes away. It seems like the coookie names are same and opening the second webapp causes the browser to override the cookie of first web app.
pavan kk
Greenhorn

Joined: Jul 28, 2010
Posts: 3
Hi Deepak,

Yes your right, by changing the cookie name of the Applications we got it solved . Thanks for the reply. The JsessionId is getting overwritten every time when the 2nd web application has been launched .

Thanks
Pavan
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Http session is getting lost in Websphere when proxy sever is used
 
Similar Threads
executing a java program from web client
Securing Apache Server at port 8080
Apache and WL 9.2
executing a java program from web client
webapplication deployed in JBOSS - Active Sessions are increasing though no users are using the app.