TOMCAT7 Configuring virtual Directories

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.