2 Replies Latest reply on Dec 19, 2007 7:12 AM by Rich Jones

    session timeout handling

    Rich Jones Newbie


      I was wondering if anyone could point me in the direction of some useful (preferably basic/simple) documentation regarding dealing witht session timeouts on seam applications?

      At present when my application times out, i see the 'no connection' icon (as expected), but then all links on the page become inactive. Hence users cannot logout and are forced to manually navigate to the login page or even restart their browsers.

      Essentially i'm looking for a simple solution to this, eg after timeout clicking on any link will redirect to login page + display a 'timeout' message if possible

      Thanks in advance


        • 1. Re: session timeout handling
          Jay Balunas Master

          Hi Rich,

          You could try this approach from the booking example. I'm not 100% sure if it works on session timeout, or just a conversation that has ended though.

          The pages.xml from the booking example has a " no-conversation-view-id="/main.xhtml"" entry that I believe will handle this case. The conversation (and session) are gone so I would think that this would forward to main.xhtml. Below is the top part of the pages.xml. You might need to actually start a conversation for this to work (I'm not sure if it works off of the session).


          <pages xmlns="http://jboss.com/products/seam/pages"
           xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.0.xsd"

          • 2. Re: session timeout handling
            Rich Jones Newbie

            Thanks for your reply

            I've tried your suggestion, it doesn't help my situation but i've left the code in (i'm sure i would have had conversation timeout problems at some point...).

            I get the impression that the technique you speak of would only have an effect if a user was still able to follow a link - ie if the convo was ended and they clicke a link they would be redirected.

            The problem here is more that the entire app goes 'dead' and nothing is clickable. It seems to happen after 10 minutes, even tho i have my tomcat session timeout set to 45 minutes, and conversation timeout set to 5 minutes (although this only applies to background conversations so the session timeout should take presidence)

            any other input appreciated, cheers