0

I have two application at two app servers both under same domain name but different application context.For example :-

 http://testApp.com/app1
 http://testApp.com/app2

i hit http://testApp.com/app1 say jession 100 is created from server and send back to browser. Now whenever app1 hits same jsession will travel as part of request header. So far so good. Now app1 redirect the request to app2 http://testApp.com/app2 Still i see same jession travels. Is it not wrong ?

As per mine understanding, jsession is unique for domain/port/ApplicationContext. So why same jessionId is trevalling across application context ?

I am using firefox as browser and weblogic as app server.

emilly
  • 8,688
  • 25
  • 78
  • 148
  • Because it is the same domain? (testApp.com) – Gimby Apr 19 '16 at 08:20
  • Well, I had the opposite issue in the past, only I looked for solution to share session between two apps on the same domain, I was using tomcat at that time and was able to achieve this by shared session valve in server.xml, maybe weblogic is using this mechanism as default... – Pavel Apr 19 '16 at 08:25
  • @Gimby As per http://stackoverflow.com/questions/595872/under-what-conditions-is-a-jsessionid-created jsessionId is per application context – emilly Apr 19 '16 at 08:30
  • That would be a default single server behavior if you don't touch any server configuration. But you hastily mentioned there that you have in fact two application servers, right? – Gimby Apr 19 '16 at 08:40
  • @Gimby Peter Štibraný answer just says its per application . it does notmentions anywhere whether its a single server or mulltiple server. Is n't it ? – emilly Apr 19 '16 at 09:43

1 Answers1

0

A cookie travels with the header when: 1. same domain 2. the path of cookie matches the request context or is the prefix of the request context.

In your case, it would be helpful to check jsessionid's path option, see if it is wrong.

Max Luan
  • 134
  • 2
  • 7