TOMCAT7 under the installation path, D:\Program Files\java\tomcat 7.0 \conf , modify Server.xml files,
in the <Host> tab, add the selected section, where Demoproject is published to Tomcat of the WebApps the project folder under the directory,
Example: <context path= "" docbase= "E:\webapps" reloadable= "true" crosscontext= "true"/>
However, a virtual directory must contain web- Inf/web.xml
Find under the Tomcat folder Tomcat 7.0\webapps\root, in this directory web- inf folder to your own folder
once added, restart TOMCAT7, then through the path http://localhost:808 0 can access the demoproject project,
It can also be accessed through the original path, such as: http://localhost:808 0 /demoproject
If you change the port to the , then direct input http://localhost can access Demoproject Engineering, more convenient.
when I test, the above selected part of the delete, access to the path http://localhost:808 0 , or to visit the demo project instead of TOMCAT7 Welcome page,
this is Tomcat Cache directory in mischief, delete path Tomcat 7.0\work\catalina\localhost the folder name under is -( horizontal bar ) folder.
Other configurations:
The list shows:
Open Tomcat 7.0\conf\web,xml file, found:
<init-param>
<param-name>listings</param-name>
<param-value>false</param-value>
</init-param>
If you put false Set to true, the directory will be allowed to be listed in the Web page, allowing Tomcat Support File list display
so note that here for security, it should be set to false
Modify Port:
In the Server.xml file under the Conf directory, modify the
redirectport= "8443"/>
8080 is the default port! You can change it to 80 so you don't need to write the port number in the Address bar .
TOMCAT7 Configuring virtual Directories