Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Session attributes get lost on Firefox

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do you have cookies enabled ?
 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic