jetty: put index.html into webroot
Question
when started, jetty per default loads all directories and war-files in its webapps directory, that i can access via context path (e.g. http:// hostname/app/ to access the project in webapps/app.war).
Now when i open http:// hostname/ i get an 404 error and a list of the available contexts. To avoid that, i placed an index.html in the webapps directory and expected it to be returned when calling http:// hostname/. But i was wrong.
So how can i tell jetty what to return when accessing "/"?
Solution
The simplest thing to do is to create a little webapp with your index page in it and to deploy that as the root context /
. To do so, provide your own context file configuration.
Context files are normally located in <jetty.home>/contexts/?.xml
(see ContextDeployer for more details).