[jetty-users] recommended approach for multiple context paths
Hello there, everyone!
I'm wondering what the recommended approach is to support multiple context paths (four, actually) for one webapp.
I see a few possible solutions, but I haven't gotten it to work:
- custom Handler to forward traffic to my webapp
- subclass WebAppContext and override context path verification
- multiple WebAppContext declarations in XML files inside contexts/
- use a RewriteHandler
- Haven't gotten it to work :( Just getting a reference to the Handler for my webapp and "forwarding" the request via Handler.handle() doesn't seem to do the trick. I'm probably doing it wrong, but I haven't found an example.
- Code needs to live outside WAR in lib/ext/ or some much location.
- WAR is actually extracted multiple times, i.e., classes are loaded multiple times, which breaks singletons.
- Request URL / path info is rewritten (although retrievable using httpRequest.getAttribute(), I know).
My ideal solution would simply forward the request to my webapp without changing the URL or having multiple copies of the WAR loaded or extracted.
Thoughts and suggestions would be greatly appreciated. Thanks! :)