Dan Agarlita wrote:
Hi all,
how do I catch http errors with tomcat?
404 Error, 403 Error. I put the same question 2 years ago :) but I forgot
I remember that are some tags in config xml, something like  ?


You can put this in your web.xml file:


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

<error-page>
        <error-code>403</error-code>
        <location>/Error.jsp</location>
</error-page>

where <error-code></error-code> can contain any code
you want to handle with your own page.

You can also handle exceptions that propogate all the way
to the container this way:

<error-page>
        <exception-type> java.lang.Exception </exception-type>
        <location>/Error.jsp</location>
</error-page>

You can, of course, have more than one of these tags,
so that different exception types cause different results.

TTYL,

Phillip

--
When the 1st Amendment no longer protects your voice.
And when the 4th Amendment no longer protects your privacy or your stuff.
Thank God we have the 2nd Amendment to tell our elected representatives that enough is enough.
It's time to put "... from my cold, dead hands" back where it belongs.


FREE AMERICA
Vote Libertarian
www.lp.org


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



Reply via email to