Serving static content and Jersey

If you want to serve static content from the same WAR as Jersey resources, it is possible to configure Jersey to run as a filter rather than a Servlet.

You can then define the property to exclude URLs matching the regular expression from being handled by Jersey. Instead request matching the pattern will fall through to the next filter and eventually the default Servlet, which can respond with your static content in the normal way.


2 thoughts on “Serving static content and Jersey

Leave a Reply

Your email address will not be published. Required fields are marked *