File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
pavan kk
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 446
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic