Documentation
Kattare is dedicated to making your hosting experience as painless as possible.
That means making as much help and documentation available as possible.
If you have a question that you think would be helpful to have here, please
[Submit your Question].
|
|
| Category |
| JSP-Java Servlets |
|
Question
|
Last Modified: Dec 23, 2003
|
| How can I setup custom Tomcat (or Resin) error pages? |
| Answer |
The standard JSP/Servlet docs on the Sun website say to add
the following to either the server-wide or the application-specific
web.xml file: (of course, this example is for a 404 page.)
<error-page>
<error-code>404</error-code>
<location>/error/404.jsp</location>
</error-page>
In resin, you can also use the resin.conf file and add something along the lines of:
<web-app id='/'>
<error-page error-code='404' location='/file_not_found.jsp'/>
</web-app>
to catch a 404 (file not found) error; -or-
<web-app id='/foo'>
<error-page exception-type='java.lang.NullPointerException'
location='/nullpointer.jsp'/>
</web-app>
to catch exceptions.
|
[FAQ Main]
[Submit a Question]
[Back to Category "JSP-Java Servlets"]
|