Wednesday, February 13, 2013

How To Host A Simple Html Page in Tomcat

There is no need to create a war to run the html file from Tomcat. Follow steps can be used.
  1. Create a folder in webapps folder e.g. MyApp
  2. Put html and css in that folder and name the html file, which you want to be the starting page for your application, index.html
  3. Start tomcat and point your browser to url "http://localhost:8080/MyApp". Your index.html page will pop up in the browser
There is another way too.Put the html or other resources to ${CATALINA_HOME}/webapps/ROOT
& open browser and browse to http://localhost:8080/yourhtml.html
 

No comments:

Post a Comment