Three ways to publish Web apps to Tomcat

Source: Internet
Author: User

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

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.