0

Our flow actually works fine in lower development environments but blows out occasionally (5% of the time) in the test environment. So I can see that there is no problem in the code. (Test environment has two appservers). We are using Webspher app server btw

The problem is whenever we try to navigate through the flow, suddenly the flow gets reset reset and the user lands in the first page. However debugging in firebug, we can see that whenever there is a change in JSESSIONID, flow gets reset. Our application has 2 WARs. So when the page loads, the images, js, css are in one and the java controllers are in another. So could this cause any issue in corrupting/modifying the JSESSIONID.

Not really able to figure out why the cookie is getting changed. Please help. Thanks!

Ashot Karakhanyan
  • 2,804
  • 3
  • 23
  • 28
Ruud
  • 31
  • 6

1 Answers1

1

The JSESSIONID cookie is the servlet session cookie, and it should not change during one session.

The JSESSIONID cookie is created by the servlet container the first time that request.getSession() is called, have a look at this answer.

in this case it seems some servlet requests go to one WAR, while other requests go to the other, which causes two JSESSIONID cookies to be generated, that are not interchangeable.

One solution is to deploy all code in the same WAR, so that only one JSESSION cookie is created.

Another explanation is that in the test server there is a very short session timeout configured, that causes the session to be reset while the user is navigating.

also check the web.xml for the WAR and the spring security configuration in the server, to see if the session timeout settings are different in test. sometimes the build process is environment specific and modifies settings.

Community
  • 1
  • 1
Angular University
  • 42,341
  • 15
  • 74
  • 81