By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,727 Members | 768 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,727 IT Pros & Developers. It's quick & easy.

configure error page in tomcat-4.1.24

P: n/a
Hi all,
I have a webapplication running on tomcat-4.1.24.
I want to show a error page (error.jsp) if the server throws any error.
can it be done by configuration of server.xml or web.xml?
i dont want to write <@ page errorPage="error.jsp"> in all files.
Thanking you
Bopanna
Jul 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a

"Bopanna" <bo*****@rcssoft.com> wrote in message
news:5e*************************@posting.google.co m...
| Hi all,
| I have a webapplication running on tomcat-4.1.24.
| I want to show a error page (error.jsp) if the server throws any error.
| can it be done by configuration of server.xml or web.xml?
| i dont want to write <@ page errorPage="error.jsp"> in all files.
| Thanking you
| Bopanna

In web.xml :-)

<error-page>
Contains a mapping between an error code or exception type to the path of
a resource in the web application.
<error-code>theErrorCodeNumber</error-code>
The HTTP error code, ex: 404.
<exception-type>java.exception.TypeOfException</exception-type>
A Java exception type.

<location>path/to/resource</location>
The location of the resource in the web application.

See the dtd http://java.sun.com/j2ee/dtds/web-app_2_2.dtd

for example:
<error-page>
<error-code>500</error-code>
<location>/ErrorHandler</location>
</error-page>

--
-P


Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.