Hello,
I have a page that uses https and when i do a redirect from the bean that uses that https page to some http page. Then my session id changes. How can i stop this from happening? Please help me. Thanks in advance :)
Hello,
I have a page that uses https and when i do a redirect from the bean that uses that https page to some http page. Then my session id changes. How can i stop this from happening? Please help me. Thanks in advance :)
Hey,
Do you mean you are redirecting to different HTTP domain URL? then its a diff. application you are calling. That will change the sessionId.
Are you calling same applciation URL for some other page with http protocol?
--- EDIT ---
Check this url, it shows same problem using PHP. You may get the solution. It says,
When you switch between the HTTP and HTTPS services on the same server, your HTTP session ID is not being passed to the HTTPS session.
http://stackoverflow.com/questions/441496/session-lost-when-switching-from-http-to-https-in-php
hope this helps.
thanks.
The cookie is not kept, so you must pass the jsessionid in the URL:
response.sendRedirect("http://myserver/path;jsessionid=" + request.getSession().getId());