On Jan 14, 2009, at 1:38 PM, Caldarale, Charles R wrote:
From: Nathan Potter [mailto:n...@opendap.org]
Subject: Re: Tomcat returns HTTP status of 200 when
HttpServletResponse.sendError() called.
I mapped one of my servlets to be the default servlet:
<servlet-mapping>
<servlet-name>hyrax</servlet-name>
<url-pattern>*</url-pattern>
</servlet-mapping>
And since it doesn't serve static content like the Tomcat
DefaultServlet, I'm not seeing the expected behavior for
the error-page mappings.
If you don't want to rewrite your mappings (and probably program
logic), then isolate your static content - including error pages -
to some particular branch of your directory tree and put in a
mapping for the existing DefaultServlet to handle it.
So do you mean something like this?
<servlet>
<servlet-name>default</servlet-name>
<servlet-class>
org.apache.catalina.servlets.DefaultServlet
</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
...
<servlet-mapping>
<servlet-name>default</servlet-name>
<url-pattern>/err/*</url-pattern>
</servlet-mapping>
And I place all of my default error pages in $CATALINA_HOME/webapps/
myContext/err/
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE
PROPRIETARY MATERIAL and is thus for use only by the intended
recipient. If you received this in error, please contact the sender
and delete the e-mail and its attachments from all computers.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org
= = =
Nathan Potter ndp at opendap.org
OPeNDAP, Inc. 541.752.1852
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org