Results 1 to 2 of 2

Thread: Session Expiry

  1. #1
    Jack is offline Senior Member
    Join Date
    Jun 2007
    Posts
    130
    Rep Power
    0

    Default Session Expiry

    I'm using Struts in web module in my J2EE application.
    When session expires, I want to forward to error.jsp.

    How can I implement this?

  2. #2
    Peter is offline Senior Member
    Join Date
    Jun 2007
    Posts
    119
    Rep Power
    0

    Default

    use HttpSessionListener and use its life cycle event to detect the session invalidation.

    Use following to make sure that the session is invalid and forward or redirect to an error.jsp page.
    Java Code:
    HttpServletRequest.getRequestedSessionId() 
    
    HttpServletRequest.isRequestedSessionIdValid().

Similar Threads

  1. how to create session in jsp
    By sandip_ingle21 in forum JavaServer Pages (JSP) and JSTL
    Replies: 4
    Last Post: 04-21-2011, 04:10 AM
  2. session object
    By 5alive in forum New To Java
    Replies: 1
    Last Post: 06-23-2008, 01:45 AM
  3. session
    By jm_it04 in forum AWT / Swing
    Replies: 0
    Last Post: 03-04-2008, 12:32 PM
  4. Use session
    By Eric in forum Java Servlet
    Replies: 1
    Last Post: 07-05-2007, 09:34 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •