• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1758
  • Last Modified:

Tomcat error page

Hi,

I want a custom error page to handle all types of tomcat errors. Is it possible without having to add the errorPage directive to every single JSP?

Thanks
0
MaritimeSource
Asked:
MaritimeSource
1 Solution
 
olgavillamizarCommented:
Maybe you can use a redirect to a error page
0
 
syd108Commented:
well if you are using some form of MVC pattern I am sure there are many points where yuo can intersect the error and redirect to the desired JSP.

For example in struts you have a directive in the struts-config file that will let you do that.

Also web.xml has the error-page element with the following nested elem

<error-code>
 Optional
 A valid HTTP error code, for example, 404.
 
<exception-type>
 Optional
 A fully-qualified class name of a Java exception type, for example, java.lang.string
 
<location>
 Required
 The location of the resource to display in response to the error. For example, /myErrorPg.html.
 

regards,
Naveen Sydney

0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now