This would not work for includes since includes can't change the status
or change any headers.
-Tim
Filip Hanik - Dev Lists wrote:
you could also create a response wrapper in a filter, capture the
status/output,
so if the servlet sets 404, you can react to it appropriately
Filip
Antonio wrote:
2008/10/22 Tim Funk <[EMAIL PROTECTED]>:
if (null==servletContext.getResource(request.getServletPath())) {
Are you sure that it works? the "getServletPath" returns the path or
the name of the servlet.
Notice that anything could be included, from a JSP page to a called
servlet with parameters.
Anyway I think that the filter suggestion is good (thanks :-) ),
probably a HTTP request wrapper that checks if at least 1 byte is
written to the response could be useful.
Then map the filter as needed (with any additional checks too)
Something like:
<filter-mapping>
<filter-name>my_filter</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>INCLUDE</dispatcher>
</filter-mapping>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]