Place the war file of the project in the webapps directory of Tomcat. You can use either the Internet or the LAN.
1. First, make sure you have an Internet IP address. If you are assigned a lan ip address, you need to convert it to an Internet IP address in a series, and then proceed with the following operations.
2. Get the Internet IP address and configure the Tomcat server. xml file. Configure the following three parts (the tomcat version used in this configuration is 7.0.30)
1) <connector Port = "80" protocol = "HTTP/1.1" connectiontimeout = "20000" redirectport = "8443"/> change the port to 80, HTTP-based access is generally through port 80, which can avoid the trouble of entering 8080 every time.
2) <engine name = "Catalina" defaulthost = "171.35.52.187"> change the localhost of defaulhost to your own Internet IP address and provide it to external users.
3)
<Context Path = "" docbase = "/sudentmanager" reloadable = "true" crosscontext = "true"> </context> change the name in the host to an Internet IP address, at the same time, add the context tag to the tag. The content is as above. docbase represents the default project name.
After the configuration in the preceding three steps, the server configuration has been implemented. We can start Tomcat and access the project directly through the IP address.