2 Replies Latest reply on Aug 27, 2008 10:30 PM by Mark Coffin

    Session management

    Razia Bhayani Newbie
      Hi All,

      Session management problem.

      I have added,

        <session-config>
                  <session-timeout>2</session-timeout>
      </session-config>

      in my web.xml What I want is that, once the session expires the user must be redirected to login.xhtml. To achieve this I have added the snippet given below in pages.xml

      <exception class="javax.faces.application.ViewExpiredException" >
              <redirect view-id="/login.xhtml">
                  <message>Your session has timed out, please try again</message>
              </redirect>
          </exception>


      When the session times out after 2 minutes and I try to submit any data, it directs me to login.xhtml. However if I just try to browse the other links of the applications it takes me to all those pages showing null data everywhere. I was expecting that this browsing must too redirect the User to login.xhtml and indicate that the session has expired.

      How do I achieve this? Am I going wrong some where.

      regards,
      Raziya