An interesting experience of deploying web applications to tomcat8

Recently learning tomcat related knowledge, the process from scratch is the most difficult!

When learning to set up a web site, after setting the home page of the site, when accessing the web application, it is always 404. Then I check the process of my own operation and find out the error. First review your own operation process (under the guidance of Daniel's technical blog)!

1. Put a set of simple HTML with a logical relationship written in a folder. Then place the folder in the webapps in the root directory of tomcat:
Insert picture description here

2. By copying the WEB-INF folder from the ROOT under the webapps folder to the folder you set, such as the web1 folder I set.
Insert picture description here
Insert picture description here

3 Then modify the web.xml file in the WEB-INF you copied, which is the configuration information of the site. Plus the information settings on the homepage of the web site.
<welcome-file-list> <welcome-file>web.html <!---首页的URL web.html--> </welcome-file> </welcome-file-list>
Insert picture description here
Then save the changes. Then I went to enter the URL of the site I set up.
Insert picture description here
**

The result is wrong!

Then I found the problem by checking the information!
After configuring web.xml, be sure to restart tomcat. Way to restart tomcat

* Insert picture description here
Insert picture description here* When you see the open state, go to the browser and enter the URL of the web application to open the web application!
Insert picture description here
Successfully opened! ! ! !

### As long as you are willing to learn, you will be able to learn. —— Lenin

Published 11 original articles · won 9 · 10 thousand views

Guess you like

Origin blog.csdn.net/weixin_43408595/article/details/100807624