Hello,

This question probably has come up before, I just can't find it in the
archives....

I am using Tomcat 3.2.2 standalone (not with Apache).

How can I configure a particular page (servlet, static html, or jsp) to be
the "default"
page that comes up if the requested jsp is not found, instead of the 404
error.
In other words, if a user requests:
http://myTomcatSite.com/somePage.jsp

I want to have somePage.jsp come up if it exists.
But if somePage.jsp does not exist, I *don't* want the default 404 error to
be displayed. Instead I want some custom page (a servlet actually) to be
processed. I don't really care if this is achieved with a client-side
redirect or a server-side include/forward.

I have tried using the DefaultServlet, which doesn't seem to work. I have
also set up my own servlet against <url-pattern> /* </url-pattern>. This
works for servlets only, not JSPs. It seems the basic problem is that any
URI that matches *.jsp. gets processed by the JspServlet.  So it is not
determined if the .jsp file actually exists or not until the JspServlet is
triggered.

Can this custom error page functionality be configured somehow in Tomcat?

Thanks for any help,
Pierce Courtney
[EMAIL PROTECTED]


Reply via email to