undertowjaxrsserver

Serving static content in UndertowJaxrsServer

*爱你&永不变心* 提交于 2019-12-10 11:58:41
问题 I'm trying to serve static content through a ResourceHandler in my Undertow server that has a RestEasy deployment. public class Server { public static void main(String[] args) throws Exception { UndertowJaxrsServer server = new UndertowJaxrsServer(); Undertow.Builder serverBuilder = Undertow .builder() .addHttpListener(8080, "0.0.0.0") .setHandler( Handlers.path().addPrefixPath( "/web", new ResourceHandler(new PathResourceManager(Paths.get("/some/fixed/path"),100)) .setDirectoryListingEnabled