[undertow-dev] Help Configuring Handlers

Tomaž Cerar tomaz.cerar at gmail.com
Thu Mar 6 12:17:29 EST 2014


Something like this:

PathHandler root = new PathHandler();
root.addExactPath("/", servlet-root-handler);
root.addExactPath("/static-stuff", new ResourceHandler(...));

this way you map your servlet app to / and then override what ever you want
below it with resource handler.

--
tomaz


On Thu, Mar 6, 2014 at 5:45 PM, Ari King <ari.brandeis.king at gmail.com>wrote:

> There can only be one root handler. Basically handlers chain together, so
>> the current handler picks the next handler (or generates a response).
>> It sounds like what you want to do is map the JAX-RS handlers to the root
>> of the servlet deployment, and then use a path handler with the servlet
>> deployment under /api and the resource handler under /.
>>
>
> Yes, that was exactly what I was intending/attempting to do.
>
> Alternatively you just set the Servlet deployment's ResourceManager and
>> then the resources will just be served up by the DefaultServlet.
>>
>
> From the docs I know the "ResourceManager" is a built in handler, but is
> there more information on it or an example of how to set it?
>
> Thanks.
>
> -Ari
>
>
>
> _______________________________________________
> undertow-dev mailing list
> undertow-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/undertow-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/undertow-dev/attachments/20140306/fcd60181/attachment.html 


More information about the undertow-dev mailing list