Session management in JSP


Web tier: servlets, JSP, Web frameworks: Session management in JSP

  1. Session management in JSP (1 messages)

    Hi !
    I got to implement session management logic. Let me descibe the scenario. I have a (jsp) page that has five frames (eacj one jsp page)in it. I got to implement session management logic in all the frames, that is if the session is expired (say in one frame), Iam giving an alert message and redirecting to login page. The problem what Iam facing is that, when I invoke the page which has five frames, if one frame triggers the alert message, the other frames get loaded and gives error message and if I click 'OK' of alert box, then it is getting redirected to login page. I guess this problem is because of five frames. I tried checking for session validity using "request.isRequestedSessionIdValid()" method, but it doesn't work. Is there any way to implement it that too in a multiple frames scenario. Early solution is appreciated.

  2. Session management in JSP[ Go to top ]


    In your login html file, insert the following in body tag.

    <BODY onLoad="if ( != self.location)">

    This way, when one of your frame opens login page, then, the login page itself opens it in full window.