> From: Matt Veitas [mailto:mvei...@gmail.com] > Subject: Applying a servlet filter to a static resource > > I am using Tomcat 6.0.24 and am trying to use a servlet filter > on a static resource and am having some troubles as the 2nd > request returns a 304.
Are you sure it's Tomcat returning the 304, or is that being done by some intermediary? > unfortunately I can't change the calling url. What is the URL of interest? Under what name is the webapp deployed? > <filter-mapping> > <filter-name>TestFilter</filter-name> > <url-pattern>/js/config/my.json</url-pattern> > </filter-mapping> The above should give the filter control, if the <url-pattern> is correct. > Is there anything I can do to make Tomcat not return the > 304 for the 2nd request to my.json? The 304 is generated in Tomcat's DefaultServlet; your filter should be getting control before that servlet is invoked, if it's configured properly and there's nothing between the client and Tomcat that's caching the request. Try verifying that the subsequent requests are actually making it to Tomcat (enable the AccessLogValve in server.xml). - 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