users@jersey.java.net

[Jersey] Serving Static Files from a Resource

From: Volkan Yazıcı <volkan.yazici_at_gmail.com>
Date: Fri, 5 Feb 2016 17:00:39 +0100

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.]*

Best.