Sunday, January 18, 2015

Serve static web content by tomcat

The following steps can be used to server static web content by tomcat server, the static web content includes html, image, and js, jsp files.

1. create a subfolder under tomcat's webapps folder, for example, mytestfolder
2. copy html file and js file into the folder, for example, index.html
3. visit localhost:8080/mytestfolder/index.hmtl to visit the html file

In addition, jsp files can also be put in the folder and serve the client request without any servlet configuration change.

Sometimes when debugging tomcat, an error of ""Several ports (8080, 8009) required by Tomcaat v8.0 Server at localhost are already in use", to solve the issue, going to tomcat bin folder and run the below commend to close the running tomcat instance.


bash shutdown.sh

2 comments:

  1. I want to always read your blogs. I love them Are you also searching for nursing pico essay writers uk ? we are the best solution for you.

    ReplyDelete
  2. This is quite a good blog.Are you also searching for DNP Capstone Project help? we are the best solution for you. We are best known for delivering nursing writing services to students without having to break the bank.

    ReplyDelete