Pit Ah, why NetEase blog can not move over!!! I copy it one by one easy!!!! Original address: Http://buffalo-l.blog.163.com/blog/static/24495402220153911184810/?newFollowBlog
First: In the <Host> tab of Server.xml, configure <Context> label
Locate the installation directory in the TONCAT installation directory/COF/SERVE.XM
L
,
Modify the Serve.xml file, add a <Context> tag to the <HOST> tab, and refer to the following example:
<context Path = "MyWebsite" docBase = "D:\My_Code\example"/>
Then restart Tomcat. Input Address: http://localhost/MyWebsite/
The second method: Write a Abc.xml file in tomcat/conf/[engin]/[host]/in this directory,In this method the name "ABC" of the XML file is the virtual path, and the following configuration is made in the ABC. xml file
<context docbase= "D:\My_Code\example"/>
When these are done, open the http://localhost/abc/***.html directly (because my file name is index.html so I don't enter index.html in the browser)
Third: Put the Web application directly into the directory managed by the virtual host in this case, the virtual host can directly find the Web application to manage this Web application
remember must not have the Chinese path name Ah, Web page name can not have Chinese
Three ways to publish Web apps to Tomcat