A summary of how Tomcat deploys web apps is summarized in the following four common ways:
1, "Replace the root directory"
The simplest way to webapps the directory under the root folder is your file, and then enter the localhost:8080/home name. suffix
If the home page is index.html, you can not add "/home name. suffix".
2. "Deploy with Console"
Access the Http://localhost:8080 and login via Tomcat Manager to access the deployment interface.
3. "Automatic deployment with Tomcat"
Copy the application to Tomcat's WebApps path, and the Tomcat will load automatically when it starts.
4. "Modify Server.xml File Deployment"
Open Tomcat's configuration file in Conf/server.xml with UE or EditPlus, and find the following:
.....
</Host>
.....
Add the following between host:
<context path= "/mywebapps" reloadable= "true" docbase= "D:/mywebapps" workdir= "D:mywebappsemp"/>
Path: Represents the route of the access, as in the above example, access to the application is: Http://localhost:8080/Mywebapps
Reloadable: Indicates that the class pack can be loaded automatically at run time under the classes and Lib folders
Docbase: Represents the address of the application, note the direction of the slash ""
Workdir: Represents the drop address of the cache file
5. "Add custom Web Deployment files (recommended, no need to restart Tomcat)"
Under the Tomcat installation directory Confcatalinalocalhost, there are three apps from Tomcat, feel free to copy one of the XML files, and then modify Docbase to point to your own application.
and rename the path, see the third method for each parameter. Or you can create a new XML file yourself (Note that this file name will be used as the path in the context, regardless of how the path in the file is set or not),
Copy the following and modify the appropriate path.
<context path= "/test" docbase= "f:/j2ee/yazd_war_3_0" debug= "0" privileged= "true" reloadable= "true" >
</Context>
Once the deployment is complete, you can access it by http://localhost:8080/your path name.
Tomcat Deployment Web Application