>>>>> "Leschke, Scott" <[email protected]>:
> Thanks Tim,
> That’s exactly what I thought but without it I get the following from Jetty.
> HTTP ERROR 404
> Problem accessing /myApp/. Reason:
> Not Found
> Perhaps that’s related to something else and the presence/absence of
> Web-ContextPath is triggering the other issue. I’ll see what I can
> figure out in that regard.
Here is a working example:
1. This defines the web context "/ukelonn" (and attaches a shiro filter
to the web context)
https://github.com/steinarb/ukelonn/blob/8442f5df62bc973902085705c637e65c3bc00f8c/ukelonn.web.security/src/main/java/no/priv/bang/ukelonn/web/security/UkelonnServletContextHelper.java#L7
https://github.com/steinarb/ukelonn/blob/8442f5df62bc973902085705c637e65c3bc00f8c/ukelonn.web.security/src/main/java/no/priv/bang/ukelonn/web/security/UkelonnShiroFilter.java#L42
2. Here are servlets that register with the webcontext
https://github.com/steinarb/ukelonn/blob/8442f5df62bc973902085705c637e65c3bc00f8c/ukelonn.web.services/src/main/java/no/priv/bang/ukelonn/api/UkelonnRestApiServlet.java#L37
https://github.com/steinarb/ukelonn/blob/8442f5df62bc973902085705c637e65c3bc00f8c/ukelonn.web.frontend/src/main/java/no/priv/bang/ukelonn/web/frontend/UkelonnServlet.java#L36
The syntax for registering with the context ie.
HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_SELECT + "=(" +
HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_NAME +"=ukelonn)",
is a bit clumsy, but it works.
(I have on my todo list to figure out if the servlet API 3.0 annotations
can be used instead...)