My main method kind of looks like this:
String docRoot = "src/main/webapp"
final Server server = JettyHttpContainerFactory.createServer(baseUri, false);
WebAppContext webAppContext = new WebAppContext();
webAppContext.setDescriptor(docRoot + "/WEB-INF/web.xml");
So in my mind what I would like to see happen is:
- If anything occurs below /api, it should always be handled by Jersey. So errors or 400's can still be returned in json by jersey rather than by the jetty container.
- If anything is requested out of /, excluding /api then jetty should just serve it up. If a path does not exist (in detail I say 'path' meaning anything that does not have an extension) then I want to always return /index.html. If an asset doesn't exist (e.g. /images/kitten.jpg) then it shouldn't redirect and just return a 400.
Any help would be awesome!