The first step: Create a folder under the WebApps folder in the Tomcat installation directory, for storing items
Example: Create a Test folder under D:\server\Tomcat8.0\webapps
Step Two: Modify the Service.xml file in the Conf in the Tomcat directory, modify the configuration
Note: It is best to back up the original file before modifying configuration
Example: Open File D:\server\Tomcat8.0\conf\service.xml
In the <Host> tab, add <context docbase= "test" path= "/test" reloadable= "true"/>
Where: The value of Docbase test is the folder name you just created, and the value of path '/test ' is the virtual directory that accesses the URL of this project
After modification:
...... (Other configurations)
<context docbase= "test" path= "/test" reloadable= "true"/>
</Host>
Step three: Start Tomcat
such as: D:\server\Tomcat8.0\bin\startup.bat
Access:
Enter the access address in the browser, such as: 192.168.0.5:8080/test/index.html
There are no possible causes for access:
1.tomcat failed to start
2. Additional device connections-not on the same network segment.
(mobile phone can be accessed only in the same WiFi environment, you can use this method to test the effect of the Web page on the phone ...) )
Tomcat deployment project-Static Web page project