| Author |
Session attributes get lost on Firefox
|
Sandra Williams
Greenhorn
Joined: Dec 12, 2007
Posts: 3
|
|
Hi, I have a problem with storing session attribute on Firefox. I created a session and set two session attributes in it. But on the next web page, when I tried to retrieve the attributes, they returned null. This only happened on Firefox. IE works fine. Does anyone know how to solve the problem? Thanks a lot. Sandra
|
 |
Christophe Verré
Sheriff
Joined: Nov 24, 2005
Posts: 14685
|
|
|
Do you have cookies enabled ?
|
[My Blog]
All roads lead to JavaRanch
|
 |
Gangadhar Reddy
Greenhorn
Joined: Aug 13, 2007
Posts: 25
|
|
Enable cookies in firefox as follows: Tools>Options>Privacy>Accept cookies from sites. FYI, IE will not consider whether cookies are enabled or not, when you are accessing code on sessions from LOCALHOST. So, jessionid will not come into URL, when you are accessing sessions from localhost. Christophe Verre, any comments?
|
 |
Sandra Williams
Greenhorn
Joined: Dec 12, 2007
Posts: 3
|
|
|
I did enable cookie on Firefox. It doesn't work. I think the problem is whenever I go to the next page, Firefox create a new session, so the previous session is gone and the session attributes get lost. I printed the session ID in the log. On IE, the session ID stay same all the time, but on Firefox, the session ID changed when request being forwarded to the next page. Why is that?
|
 |
Ben Souther
Sheriff
Joined: Dec 11, 2004
Posts: 13410
|
|
I would download the LiveHTTPHeaders plugin for firefox. With it, you can see all of the HTTP headers (including cookies) that are being passed between the browser and server.
|
Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
|
 |
 |
|
|
subject: Session attributes get lost on Firefox
|
|
|