tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antonio <>
Subject Re: Throwing exception when including unexisting resource
Date Wed, 22 Oct 2008 13:05:25 GMT
2008/10/22 Tim Funk <>:
>  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:


To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message