[undertow-dev] Fwd: Help Configuring Handlers

Ari King ari.brandeis.king at gmail.com
Wed Mar 5 16:47:15 EST 2014


>
> It looks like this issue would be cause by your use of the PathHandler,
> rather than changing to a new ServletContainer (there should be no real
> difference between using your own and using the default).
>
> In your Servlet deployment are your JAX-RS handlers mapped under /api?
>
> If so you are then adding another /api to the path, so the resulting path
> end up being http://localhost:8080/api/api/example. If you omit the path
> handler (or register this deployment under '/', if you still want to be
> able to have other deployments registered under different contexts) then it
> should work.
>
> Yes, I registered the deployment under "/api" and assigned the jax-rs
application path to have a mapping of "/api" -- I for some reason thought
the assignments would overlap, rather than chain. As a follow-up, I do want
to set another handler, specifically:

setHandler(resource(new FileResourceManager(new File("resources/"), 100)).
setDirectoryListingEnabled(true))

Does it matter in which order handlers are set? Is it fine to use a
relative path to the "resources" folder which is found under "src/main/"?
Or is there another recommended way? Thanks.

-Ari
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/undertow-dev/attachments/20140305/b4f29a85/attachment.html 


More information about the undertow-dev mailing list