Assuming servletHandler is ServletContextHandler
(Note: it is better not to be the actual servletHandler , since this is an inner class that should not be created directly)
Then the resourceHandler will never be called, since the handling of the DefaultServlet (or Default404Servlet ) at the end of the ServletContextHandler chain will always respond, not allowing the resourceHandler even execute.
If you have a ServletContextHandler , do not use resourceHandler use the DefaultServlet in this ServletContextHandler to configure and maintain your static files.
Joakim Erdfelt Feb 05 '15 at 17:33 2015-02-05 17:33
source share