Azure – Configure Jetty to host simple HTML page

azurejettyservlet

On my Azure VM I have a Jetty server that is hosting my Java servlet which is deployed on /opt/jetty/webapps/myservlet.war pointing to example.cloudapp.net/myservlet.

In addition I want to host a simple HTML page and point example.cloudapp.net to it. Where should I place my index.html file? How can I config Jetty to do that?

Best Answer

Just create a directory called root inside webapps and put there your index.html. Jetty will serve all the static content inside root at context /.