The purpose of deploying an app to the Tomcat root is to access the app directly through "Http://[ip]:[port." Instead of using the "http://[ip]:[port]/[appname" context path.
Method One: (the simplest and most straightforward method)
Delete All files under the original Webapps/root directory and copy all files and folders under the application to the ROOT folder.
Method Two:
Delete All files under the original Webapps/root directory, modify the file "Conf/server.xml", and add the following context content configuration under the host node:
Attention:
1) The value of path is set to null;
2) The application should not be placed in the WebApps directory of Tomcat (if the above configuration is placed in the Custom folder MyApps), otherwise the access path is very problematic;
3) docbase specified to absolute path.
After this setting restarts Tomcat, if docBase points to a war file, the war is automatically extracted to the Webapps/root directory, if docBase points to the application of the extracted directory, such as docbase= "c:/ APACHE-TOMCAT-6.0.32/MYAPPS/BC ", Tomcat does not generate the Webapps/root directory (in which case the Webapps/root directory may not be deleted before, but webapps/ The content within the root directory is inaccessible), and the directory specified by Docbase is used directly when accessed.
Method Three:
Similar to method two, but not to modify the global profile "Conf/server.xml", but in the "Conf/catalina/localhost" directory to add a new file "root.xml" (Note the case, OH), the file content is as follows:
<?xml version= "1.0" encoding= "UTF-8"? ><context path= "" Docbase= "C:/apache-tomcat-6.0.32/myapps/bc.war" ></Context>
Put the project into the Tomcat root directory