It turns out that Tomcat4 has always been used directly in Server.xml, and the virtual directory is written directly.
But later Tomcat5, I didn't understand where to write it.
I have found a lot of information today, I don't understand, I have to look at the Tomcat documentation. After the exploration, I finally got the correct conclusion.
1. The virtual directory is no longer tuned in server.xml, and only the virtual host Host, but to remember the name of this Host, usually Localhost. Also remember the current Tomcat service name, default is
2. Establish a two-level subdirectory in Tomcat's Conf directory, the first level is the service name, that is, Catalina, the second level is the host name, ie localhost.
3, in the localhost directory, build the virtual directory you want. XML file, such as bbs.xml, then enter in the browser in the browser
Http: // localhost / bbs can find your directory, that is, the file name is the same name as the future directory.
4. Write the configuration of the virtual directory in this XML file:
Compared with the original writing, don't Path, because Path is your XML file name. DocBase has nothing to do with the Tomcat directory or HOST's AppBase directory.
5, restart Tomcat5, enter the URL to try, don't forget to thank me.
Attachment: The default port number 8080 is still modified in Server.xml.