To publish a web app under Tomcat, there are several ways
1. Pack into a war and copy it to the tomcat/webapp/directory
This way, when Tomcat starts, it will be automatically extracted to the same name directory, access path with the directory name can be
2. Modify Conf/server.xml
Modify Conf/server.xml, find <Host> this configuration
Unpackwars= "true" autodeploy= "true"
Xmlvalidation= "false" Xmlnamespaceaware= "false" >
Add <context> config inside, i.e. add a Web application such as:
<context path= "/abc" docbase= "D:\del\workspace\testWeb\src\main\webapp" reloadable= "true" ></Context>
However, this configuration method is not recommended
3. Do not modify Server.xml "Recommended use of this method"
Create a new XML file under the Conf "Catalina" localhost for the Tomcat folder (for the Tomcat6 version and above, you need to make the two folders yourself Catalina and localhost). Content is <?xml version= "1.0" encoding= "UTF-8"?> <context docbase= "Replace with your path" reloadable= "true" > </ Context> Note that this way, configure path=?? is invalid, the path to the specific Web Access is based on the newly configured XML file name, such as Kkk.xml, so accessing this Web application requires/kkk/
Tomcat below web App publishing path configuration (i.e. virtual directory configuration)