Knowledge Base - FAQ

Question: How can I setup custom Tomcat (or Resin) error pages?

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.


Last Modified: Dec 23, 2003


Select a category
Search:

Kattare is Trustwave Certified and Safe Harbor Certified | Rated Safe For Kids by ICRA | All Rights Reserved Worldwide
Copyright © 1997 - 2012 Kättare Internet Services | Processed in 0.014 seconds by webmail in Corvallis, Oregon