Please help a little more; I am not sure what you mean.
The <error-page> directive as documented in SRV.9.9.2 of
the 2.4 servlet spec mentions that we can nominate a custom
error page, otherwise I understand we get Tomcat's default
one.
But we want *no* error page, just a 404 status returned to
the browser, which will then presumably present this failure
to the user in its own way. Or have I musunderstood 404s?
Exactly what <error-page> element will achieve this, and
where should we call ...setStatus(...NOT_FOUND)?
Paul Singleton
Mirek Stohr wrote:
You should use the following procedure
HttpServletResponse.setStatus(HttpServletResponse.SC_NOT_FOUND);
in cooperation with the mentioned <error-page> directive in web.xml.
Mirek
L. Mohan Arun wrote:
Tomcat 4.1
How can I configure Tomcat 4 to return HTTP status code 404 for a "404 Page
Not Found" error? Currently it displays a HTML page with "Error type" etc.
with status code 200.
The docs say <error-page> element in web.xml can be configured to serve
another page in response to a 404 error but this is not what I want (because
it will return a 200 OK status). I want the actual error code 404 to be
returned to the client and HTTP status code 404 (Page not found).
Mohan Arun
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.10.18/89 - Release Date: 2/Sep/2005
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]