I need to serve several Java web applications on a single server instance, but add them dynamically to a specific URI.
e.g.
launch webapp to this context /user_1_app
launch webapp to this context /user_2_app
I don’t know what webserver to use, but I’m now investigating Jetty
Can I just drop the wars in /usr/share/jetty/webapps ?
But how can I add new ones without bouncing the server?
It have read about a way to use the scanInterval feature from ContextDeployer (which works with exploded directories) and implement it for WebAppDeployer (for wars)
Where can I get a guide to do so ?
All said, you can just drop WARs in the webapps directory, and they’ll just automatically deploy and come alive. IF you remove the WARs, they go away.
However, being not familiar specifically with Jetty in this regard, it is better to go through some formal deployment process. This gives your WAR access to all of the Lifecycle events. So it knows it is starting up and, perhaps as importantly, knows that it is shutting down.
But if you simply want to make them available, then copying WARs will do that and they will auto-deploy.