I have two web applications 1. test.war 2. birt.war
I set cookies in the HTTP response header for birt url
Cookie cookie = new Cookie(GlobalConstants.JSESSIONID, request.getSession(false).getId());
cookie.setPath("/birt");
response.addCookie(cookie);
Then I open the birt url with the corresponding url parameters in javascript like
window.open(url);
But in the next request from birt, I got a new JSESSIONID. This works in JBoss6 AS.
I can see cookies in the developer console
**Request 1**
http://192.168.10.7:8080/test
Cookies are
Response Cookie :
JSESSIONID :
value = 9G6bzvsF-ijbynGTmbWp7Ml4E5KFVHiEPlSflh16
Path = /birt
**Request 2**
http://192.168.10.7:8080/birt
Cookies are
Response Cookie :
JSESSIONID :
value = **xrLqLb5-8Vvqlkk2GKyapqwJZm5dJnyvFQOia9IM.node1** // new cookie
Path = /birt
Request Cookie :
JSESSIONID :
value = 9G6bzvsF-ijbynGTmbWp7Ml4E5KFVHiEPlSflh16
Path = /birt
I also tried adding to both wars in jboss-all.xml, but even that doesn't work.
<shared-session-config xmlns="urn:jboss:shared-session-config:1.0">
<session-config>
<cookie-config>
<path>/</path>
</cookie-config>
</session-config>
</shared-session-config>
happy source
share