2 Replies Latest reply on Jul 20, 2009 4:57 PM by oneworld95

    Pass parameters to an error page

    oneworld95

      I've got a Seam app where all exceptions redirect the user to error.xhtml. How do I pass a variable to the page, such as User Registration, so it can then be displayed on the error page? Thanks.

        • 1. Re: Pass parameters to an error page
          fup

          You can pass JSF FacesMessages to the error page.  These can be specified in the pages.xml file. See chapter 6.12.4. of the reference manual. The following snippet is taken from there:


          <exception class="javax.persistence.PersistenceException">
          <end-conversation/>
          <redirect view-id="/error.xhtml">
          <message>Database access failed</message>
          </redirect>
          </exception>

          • 2. Re: Pass parameters to an error page
            oneworld95

            Thanks, Frank. Can the underlying exception message still be displayed along with the custom message?