Unfortunately, the <exception-type> does not catch return code. I already have one <exception-type>java.lang.Exception</exception-type> which is a good umbrella for all exception an alike. However, it does not catch 404, for example. It seems like Tomcat catches it and handles it separately. Due to the modula nature of my application, I have > 40 web applications. I really don't look forward to managing a long list of <error-page> for each error code in 40+ web.xml files.

I wonder if I can use a filter to catch the setting of a status code > 200 and does a page forward there ....

--
Rick

Shapira, Yoav wrote:

Hi,
You can use <exception-type> to catch a broad class of exceptions (such
as java.lang.Exception for example ;)  Or maybe
javax.servlet.ServletException).  If you use the error-code approach,
you have to list them individually, which you're right is verbose and
time-consuming.  There might be a visual web.xml editor out there that
can help you.

Yoav Shapira http://www.yoavshapira.com




-----Original Message-----
From: Rick Wong [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 14, 2004 8:43 PM
To: Tomcat Users List
Subject: Customizing Tomcat error page

Hi,

I am trying to replace the default Tomcat error page for my web
applications.  I understand that I can specify <error-page> in the
web.xml deployment descriptor, but that would require me to do that for
every single error code.  Looking at the HTTP response code, there is a
potentially long list of code that I might be interested in handling.

Is there a simple way to trap these errors and redirect to my specific
error page?

Thanks,
--
Rick

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






This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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




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



Reply via email to