Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Toggle between 2 different Web application  RSS feed

 
mathew john
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have 2 different WebApplication installed on 2 different Servers in JRUN .
i have given a link to the other WebApplication .when i click on the link i invoke the url of the other WebApplication.When i come back and try to invoke the servlets the SessionId is different .The Problem is i have set a lot of Session Variables in my main Application .But when i get back after invoking the other WebApp,All my Session Variables which i set is lost .

i tried printing the SessionId and it printed a different SessionId when i toggled between the Web app.

Looks like the Servletcontext is Different for the 2 web App .not very sure.

Can anyone guide me on this .
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It may be the context for the sessionID. By default cookies are stored against the root context for the domain and made available to all sub-contexts. The first thing you should do is verify this behaviour. Grab a HTTP proxy like the firefox plugin, the one in SOAP or some of the others discussed in this forum (sorry, I'm drawing a blank at the moment try searching this forum) and see how the cookie is set and se-sent.

If this is the issue, you'll need to find out how to ensure the sessions in each context are stored in a separate cookie context. Not something I can help you do in JRun unfortunately.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this thread has links for the HTTP capturing progams I use.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I use:
http://livehttpheaders.mozdev.org/

or
tcpflow if I want to get a little lower in the stack.
 
mathew john
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi ,
i used a tool called HttpCommView for tracing this problem .
what is actually happening is when we come back from the 2nd aplication
the sessionId of the main Application is overwritten or it takes
the sessionId of the 2nd Application.So Basically whatever Session Variables
i had set in the main Application is lost once i come back from the 2nd web application .

my main problem is how to retrieve all those Session Variables back .if i dont
get them back my main application is a dead Duck .

i also tried this in Weblogic where these 2 applications were installed on the same server ,then this problem does not happen.

in Jrun i had to create 2 different managed Servers because of some common DLL Clash ,then this problem occured .

The best part is it is Customer reported issue. i hope i can do something about it .
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!