At the end of a project, it is often mapped directly to an IP address as needed. At this point you need to remove the port and project name, in the time of the visit. The following examples provide a way to implement this.
1. When entering Tomcat_home, create a folder and name it WebDB (here is webdb, which can be modified to other names as needed. )。
2. Go into the WebDB folder and create a folder in which root (where Root is capitalized), and copy the contents of your project back to root. Then enter the Tomcat_home/webapps, Balancer folder back to the WebDB folder.
3. In Tomcat_home/conf/server.xml, find this sentence:
Unpackwars= "true" autodeploy= "true"
Xmlvalidation= "false" Xmlnamespaceaware= "false" >
Then replace the WebApps webdb in the appbase= "WebApps".
Unpackwars= "true" autodeploy= "true"
Xmlvalidation= "false" Xmlnamespaceaware= "false" >
4. In this way, when you visit the project, you can access it by removing the URL of the project name. Here is a catalogue of such a map for your reference.
5. Remove the port number without having to say it in detail. is to open the Tomcat_home/conf/server.xml to find the original port number (such as 8080), after modification to 80, you can access without entering the port number. However, be careful to prevent other programs from taking up port 80.
6. Some friends may say, why not delete the contents of root in the WebApps, and then copy the item back to root, so you can achieve the desired effect. I think so, in fact, there are many ways. All roads lead to Rome. One of the benefits of doing this is that when you use the Tomcat console, you can change the catalog back in a very text way.
This article from Csdn Blog, reproduced please indicate the source: http://blog.csdn.net/liuyf8688/archive/2006/10/16/1337131.aspx
Two
Open Tomcat5.5/conf/server.xml, add <Context> segment to
XML code
<context path= "" docbase= "D:/eforum" reloadable= "true" debug= "0" privileged= "true" >
</Context>
Server.xml for configuration on
<context path= "" docbase= "D:/eforum" reloadable= "true" debug= "0" privileged= "true" >
</Context>
Docbase for the name of the project that you want to display by default, if you do port mapping, you can access your home page in the form of Http://IP.
Three, is mentioned above, the project directly to the root, replace the content of Tomcat.