Reliable data serving

If those are static files, just link to it directly. All decent servletcontainers/appservers have a well-developed DefaultServlet. If those are static files located outside the webapplication from where you’d link them to, then you can also just add the root folder of those files as another context. It’s unclear which server you’re using, but if … Read more

Serving static files from alternate path in embedded Jetty

What you need: A DefaultServlet at “https://stackoverflow.com/” (recommended, it is a requirement of the servlet spec) this should be at named dispatcher of “default” (another requirement of servlet spec) An alternate DefaultServlet with your custom static content, configured via init-params Using a different named dispatcher than “default” (to avoid a name collision between other servlet … Read more