1 Reply Latest reply on Jul 5, 2013 5:00 PM by Hector Mendoza

    Seam session timeout sometimes show the faces messages on login page.

    Hector Mendoza Newbie

      Hi there,

       

      We are building an application with Seam 2.2.0.GA and JBoss 5.1, the problem here is that after the session expires the "pages.xml" file catch the "ViewExpiredException" but sometimes the error message appears in my login page. The exception section in my pages.xml file is this:

       

        <exception class="javax.faces.application.ViewExpiredException">
        <end-conversation/>
        <redirect view-id="/login.xhtml">
         <message severity="warn">Your session is expired, please try again.</message>
        </redirect>
       </exception>
      

       

      But, as I mention before, sometimes the message appears after a redirect, or just get redirected to the login page without any message at all. The only difference that I notice is turning on seam debug and compare the log lines, the difference that I have found is when the error message is shown this additional lines was displayed:

       

      12:51:15,906 INFO  [STDOUT] 12:51:15,906 DEBUG [ResourceLoader] loaded resource bundle: messages
      12:51:15,906 INFO  [STDOUT] 12:51:15,906 DEBUG [ResourceLoader] resource bundle missing: ValidatorMessages
      12:51:15,906 INFO  [STDOUT] 12:51:15,906 DEBUG [ResourceLoader] loaded resource bundle: org/hibernate/validator/resources/DefaultValidatorMessages
      12:51:15,906 INFO  [STDOUT] 12:51:15,906 DEBUG [ResourceLoader] loaded resource bundle: javax.faces.Messages
      ...
      ...
      12:51:15,968 INFO  [STDOUT] 12:51:15,968 DEBUG [Exceptions] reading exception mappings from /WEB-INF/pages.xml
      

       

      Sounds logic that after catching the exception it get redirect to the login page, but the message got lost somewhere.

      Just for the record, I reproduce this behavior in the same way: the same seam page (.xhtml) and doing click in the same button (a:commandButton) and it did that actions.