• 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

Sessions created randomly

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have a web application where I'm using Struts, Frameset, WebSphere 5.0 and IE 6. In my application, I could login and get the defined frameset successfully, but when I logoff and try to re-login in the same browser, sessions are getting created randomly even though I set create session false, and the session information is lost. I have seen a positing on web that session variables will be lost if frameset is used in IE 6. This may not be correct in my case, becos for the first time everything is working fine. I tries all possibilities.

Please share your ideas sothat I can try to fix the problem.

Thanks a lot
 
pie sneak
Posts: 4727
Mac VI Editor Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When you say you're setting create session to false, I assume you mean request.getSession(false), which doesn't do what I think you are expecting. Setting false there only means that if a session doesn't exist the method will return null instead of creating a new session. So for your situation the session is getting created by something else before reaching that method.

So two unexpected things are happening:
1) The original session is getting killed.
2) A new session is getting created on its own.

It's hard for me to know the cause of 1 without more info. Here are some insights for figuring out part 2:
Avoiding automatic creation of a session
 
Vijaya Madduri
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Marc,
Thank you very much for your reply. I tried setting the session attribute in page directive to false, but then I was totally unable to access the session information which is not the expected behaviour.

Strange thing is, everything is perfectly working for the first time, only one session is getting created and used through out, until I logoff. But when I logoff and re-login, the session ID is consistent till the frameset.jsp is accessed, and after that the session IDs are getting changed in the other 2 frame jsps. I could not suspect there is any problem with the code, becos the same code is working fine on WebSphere 3.5.3, and now when I'm trying on 5.0, I'm getting this problem.

Also I tried developing a test web application with the same Login-> Logoff->Login scenario, consisting of frameset. That is also working fine. So I thought the problem might not be with the frameset and browser version.

I appreciate if any new ideas are sent for debugging.

Thanks
 
Marc Peabody
pie sneak
Posts: 4727
Mac VI Editor Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I haven't gotten a chance to say this in a while but here goes:

Frames are evil.

Now that I have that out of the way, without knowing anything about the frameset.jsp that you refer to, I'm assuming that a logout only occurs in a single frame and targets only itself and not the entire browser window. If it were to target the entire browser window it should start all three up with a new session the next time you enter the set of frames. Just a hunch.
 
reply
    Bookmark Topic Watch Topic
  • New Topic