Chuck et. al,
I tried the thing below, but Tomcat can't find the class:
org.apache.catalina.servlets.DefaultServlet
On this page of the Tomcat docs:
http://tomcat.apache.org/tomcat-6.0-doc/default-servlet.html
There is good infrormation but when I put this:
<servlet>
<servlet-name>docs</servlet-name>
<servlet-class>org.apache.catalina.servlets.DefaultServlet</
servlet-class>
<init-param>
<param-name>debug</param-name>
<param-value>0</param-value>
</init-param>
<init-param>
<param-name>listings</param-name>
<param-value>false</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
...
<servlet-mapping>
<servlet-name>docs</servlet-name>
<url-pattern>/docs</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>docs</servlet-name>
<url-pattern>/docs/*</url-pattern>
</servlet-mapping>
In my web.xml it simply doesn't work. It appears that no servlet is
associated with /docs or /docs/*. Interestingly my IDE can't seem to
find the class, although it is used in $CATALINA_HOME/conf/web.xml
Is there something else I need to do? Include or copy a jar file from
somewhere?
Nathan
On Jan 14, 2009, at 9:20 PM, Caldarale, Charles R wrote:
From: Nathan Potter [mailto:n...@opendap.org]
Subject: Re: Tomcat returns HTTP status of 200 when
HttpServletResponse.sendError() called.
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>
Yes, but I think you're going to have to change the <servlet-name>
value to something else so it doesn't conflict with the one in conf/
web.xml that's shared by all webapps. (It's been a while since I
had to do this, but I seem to recall that was necessary to avoid
ugly messages at startup.)
And I place all of my default error pages in
$CATALINA_HOME/webapps/myContext/err/
Yes. You could also use the same technique to have the
DefaultServlet handle other static content if you want.
- 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