Try...

  <error-page>
    <error-code>404</error-code>
    <location>>/WEB-INF/jsp/Error.jsp</location>
  </error-page>
  <error-page>
    <error-code>406</error-code>
    <location>>/WEB-INF/jsp/Error.jsp</location>
  </error-page>

I am not sure if you can combine them in one <error-page> tag however some
of our more experienced people on this list might be able to field this
one. This is what I do in my web.xml file and it works as I want it to (I
check for 404 and 500).

Kindest Regards,
Matt Anderson

>
> I'm trying to work out how to configure web.xml to use a custom error page
> when one of a list of HTTP status codes are encountered.  Couldn't find
> any
> documentation, so pure guesswork led me to try this:
>
>       <error-page>
>               <error-code>404,406</error-code>
>               <location>/WEB-INF/jsp/Error.jsp</location>
>       </error-page>
>
> It doesn't do what I was intending, in that neither 404 nor 406 codes are
> handled by Error.jsp - however I was surprised that there is no Exception
> logged by Tomcat when parsing this web.xml - shouldn't it throw an
> Exception, rather than ignore it??  I've found that Tomcat is usually very
> thorough at reporting problems with web.xml, so this seems unusual.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to