Assuming that servletHandler
is a ServletContextHandler
(Note: it best not be an actual ServletHandler
, as that's an internal class, not meant to be instantiated directly)
Then the resourceHandler
will never be called, as the DefaultServlet
processing (or Default404Servlet
) at the end of the ServletContextHandler
chain will always respond, not allowing resourceHandler
to even execute.
If you have a ServletContextHandler
, do not use ResourceHandler
use the DefaultServlet
in that ServletContextHandler
to setup and serve your static files.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…