Serving Static Files from a Resource

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Serving Static Files from a Resource

Volkan Yazıcı
Hi all!

I have a Maven project composed of three modules:

- core: contains JAX-RS resources
- standalone: starts the server via JettyHttpContainerFactory.createServer(serverUri, resourceConfig) and is used for development/debugging purposes
- webapp: packages the resources into a WAR with necessary web.xml configuration

How can I create a JAX-RS Resource class in core module to serve static files?

[I have been Google'ing for a couple of days. All the answers that I found either apply to webapp or standalone. But I want to serve the static files from a JAX-RS resource class. Sorry if I am asking something that has already been answered before.]