• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

IE 5.5 patch caused session.isNew() to be true always

 
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just wanna share an experience here: -
I've done various tests and find out that the session ID is the same as they traverse across pages. But, the session.isNew() is always "true". For example: -

BigDecimal bg = new BigDecimal("123");
session.setAttribute("bg",bg);
Object obj=session.getAttribute("bg");
// test
if(session.isNew())
System.out.println("Session is new");

I've placed a similar check on its following JSP page. And it's new. This is actually not an error as the Servlet specs did say that isNew() will always return true till the browser has returned to the server.
From the JSP, I check its following Action (perform method) session....again is new! No, this is the problem. How can this be? Something is wrong, huh?
The interesting thing is why it used to work? What's the diff between today and the last time? Ahhhh...I've updated my IE 5.5 to run the latest patch from Microsoft.
Therefore, I've to download another browser to test. I used mozilla.org. True enough....it works. This proof that Struts and your component is clean and only IE patch sucks.
I think you should put this mail as one of your support knowledge base.

Gee...this is annoying. I hate Microsoft!!!
 
Sheriff
Posts: 4313
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Couple questions:
1- Are you sure you have cookies turned ON in IE 5.5? -- You won't be able to maintain session without any cookies.
2- So on each page you get session.isNew() == true -- but can you store on object in session on page1.jsp and retrieve the object in page2.jsp? or has the object disappeared?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic