Discussions

Web tier: servlets, JSP, Web frameworks: invalidate session when closing browser

  1. invalidate session when closing browser (5 messages)

    i have created a session in my jsp. and i want to end the sesion when the user closes its browser.

    are there any solution without a javascript ? i mean can i do it by modifying the jsp source or web.xml ?

    thanx all !

    Threaded Messages (5)

  2. Hi u can use this session timeout can be specified on web.xml
    <session-config>
    <session-timeout>30</session-timeout>
    </session-config>.
    U can also try this,I was using the project at http://securityfilter.sourceforge.net/.
  3. thanx Vijayakumar Govindasamy;

    the project is usefull and does what i want.. thanx for ur help,

    but i think i couldnt explain what i want..

    my problem is: i when the user logs in, i have created a session. i define its timeout period, and the session works but the user closes its browser, and reopen it, paste the direct link whic i use in my web app., and the session is still alive.. but i want to drop the session when the user closes all the program windows..
  4. Cookie Timeout[ Go to top ]

    If you don't specify a maxage value when writing the session cookie, it will be treated as a temporary cookie by the browser, and destroyed when the browser is closed. Any new browser sessions will not have this cookie, and therefore the application server will initiate a new session.
  5. i was using mozilla as a web browser, mozilla doesnt end session when the browser closed..

    but internet explorer kills the session and act as i want..
  6. close session[ Go to top ]

    Hi

     

    did you resolve this situation??

     

    session-timeout is correct but I need to invalidate session on close browser..

     

    thanks