This week's book giveaway is in the General Computing forum.
We're giving away four copies of Emmy in the Key of Code and have Aimee Lucido on-line!
See this thread for details.
Win a copy of Emmy in the Key of Code this week in the General Computing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

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

 
Greenhorn
Posts: 3
  • 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
  • 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

 
Ranch Hand
Posts: 446
  • 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
  • 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 AM MIGHTY! Especially when I hold this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!