-
1. HttpSession in JBoss
drmikeh May 11, 2011 2:21 PM (in response to megasilver)I ran into the same problem and looked at the cookie being created for the JBoss connection. I discovered that the default cookie settings for managing the session id include the following settings:
Name: JSESSIONID
Content: <session id is here>
Host: <server host is here>
Path: <context root>
Send For: Encrypted connections only
Expires: At end of session
So I switched from HTTP to HTTPS and everything started working. What is happening with the HTTP request is that the browser doesn't send the cookie to the server with each request, so the server has to start over and create a new session. The server does send the cookie with the new session to the browser but the browser never sends it back. With HTTPS the browser is sending the cookie to the server thus negating the need to create a new session.
The way to fix this for HTTP is to modify the server.xml file and configure the Connector with secure="false" and scheme="http".
Mike
-
2. Re: HttpSession in JBoss
zekela104 Jul 29, 2011 12:40 PM (in response to drmikeh)Hi Mike:
I ported an existing production app from JBOSS 4.2.2 to JBOSS 7. I am now running into this exact same issue. Which environment are you running in? Where did you find the default cookie settings?
Thanks,
Steve