1 Reply Latest reply on May 28, 2009 1:06 AM by Arbi Sookazian

    Exception handling redirect

    andres andres Newbie
      Hello.

      I would like to know if it is possible in seam with the Exception handling, not to redirect.

      I want to catch the exception thrown by the exception handler and show the message in the same page.

      I tried:

      <exception class="org.jboss.seam.web.FileUploadException">
          
           <message>#{org.jboss.seam.handledException.message}</message>
         
      </exception>

      It didnt work.
      I found in this forurm, a way to redirect to the previous page using filters, but It didnt work either.

      Thank you very much!!!
        • 1. Re: Exception handling redirect
          Arbi Sookazian Master

          Have you tried creating a pages.xml specifically for that particular page (foo.xhtml)?


          like foo.page.xml?


          and then write:


           <exception class="org.jboss.seam.web.FileUploadException">
                   <redirect view-id="/foo.xhtml">
                     <message>#{org.jboss.seam.handledException.message}</message>
                   </redirect>
               </exception> 



          which will postback to the same JSF page.