On Jan 12, 2009, at 6:08 PM, Caldarale, Charles R wrote:
But how do I serve them without a servlet to do it?
You don't have to serve them - Tomcat's DefaultServlet does it for
you, just as it does for all static resources.
How do I set the value of the location element in the
error page declaration:
So that tomcat will grab a static HTML page from disk?
You normally would put static error pages in a separate directory,
so that they will not be processed by any of your servlets.
I see the conflict in my design now:
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. Which is kind of a bummer: People pretty much rely on
the fact that the service defaults to the "hyrax" servlet.
Is sendError() using a redirect?
No, more like an internal forward.
I just did some more testing and discovered that if I don't actually
call response.setStatus() in my docs servlet (which serves the static
content) then it seems to inherit(?) a status from the "internal
forward" .
Is that right? Would I be better off just not calling
response.setStatus() unless something actually goes awry with the
request?
= = =
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