3 Replies Latest reply on Apr 3, 2005 2:20 PM by spoonman464

    exception-type ignored in web.xml

    bcollet

      Hi all,
      I am trying to redirect the user to an error page in case of error. It works when using error-code but not exception-type.

      <error-page>
       <error-code>500</error-code>
       <location>/error.jsp</location>
       </error-page>
       <error-page>
       <exception-type>java.lang.Throwable</exception-type>
       <location>/error.jsp</location>
       </error-page>
      

      For example, it will work when an error 500 occurs but not when an ordinary exception occurs. I also tried with concrete exception classes, without success.
      Any help would be appreciated :)


        • 1. Re: exception-type ignored in web.xml
          spoonman464

          I find some trouble when using BOTH the 500 error thing AND an exception class thing in the DDs at the same time. If I only do one or the other, I get better results.

          Overall, I am having lots of trouble getting the <error-page> stuff to work as advertised. Between using some <error-page> stuff and some JSP page directives, I get a variety of results and cannot really explain with certainty why I'm getting what I'm getting.

          Currently, I am doing the 100 million experiments required to figure it out. I'll post what I find.

          Spoon

          • 2. Re: exception-type ignored in web.xml
            bcollet

            Thnx for your answer.
            I did not have the opportunity to continue testing this feature. But I will have soon and will post my answers too.
            Right now I am able to redirect all errors to the same page, except when the session times out, in which case I have a server error page. No idea why it behaves like this...

            • 3. Re: exception-type ignored in web.xml
              spoonman464

              Have a look at the topic I posted late last night. It explains my problem and may shed some light on yours as it encompasses the majority of what I have learned while experimenting.

              http://www.jboss.org/index.html?module=bb&op=viewtopic&t=62187