tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ralph Einfeldt" <ralph.einfe...@uptime-isc.de>
Subject RE: FW: String added to session in servlet not available in jsp
Date Thu, 09 Oct 2003 16:44:03 GMT

Frames with sessions can be a complicated beast if cookies are 
disabled:

- First make shure that you encode all frame url's in the top 
  level framset. Otherwise each frame will get his own session.

- After that make shure that all frames keep in sync with the 
  session id. The simple design with one navigation frame and
  one or more content frames which contain own links will not 
  work as intended if you are not prepared to deal with the 
  session invalidation.

  See what happens with two frames where each frame contains 
  one URL encoded link:

  - Start
    -> two frames that belong to the same session are created.
  - Wait long enough to time out the session.
  - Klick on a link in one of the frames.
    -> tomcat creates a new session, the link in this frame 
       will contain the new session id, the other frame still
       contains the old session id.
  - Klick on the link in the other frame.
    -> Bingo ! tomcat creates a new session, and now both 
       frames are bound to different sessions.

  To avoid this problem there are some solutions:
  - Avoid frames
  - Just use links in one frame
  - Update the other frames (that requires some javascript)
  - Set a refresh in all frames, that is just short enough to 
    stop the session from invalidating. (This will give you 
    some unhappy users)

> -----Original Message-----
> From: rudidoku@xs4all.nl [mailto:rudidoku@xs4all.nl]
> Sent: Thursday, October 09, 2003 5:30 PM
> To: Tomcat Users List
> Subject: Re: FW: String added to session in servlet not 
> available in jsp
> 
> I should added that my JSP is a frameset with 2 frames. That 
> could be the problem!!!
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message