When you deploy two projects under Tomcat, only one can access and another 404 error occurs, how to resolve

Source: Internet
Author: User

When you deploy two projects under Tomcat, only one can access and another 404 error occurs, how to resolve

In the development of new projects, sometimes in order to save time, directly to the project has been done in a copy into the renamed B project, and then in the B Project for the development of functions,

At this time, if you deploy a A, B project to Tomcat, you can only access one of the project, and another 404 error, the following method can be resolved:

Step 1: Locate the Web. xml file under Engineering

Step 2: Modify the properties of the webapprootkey so that inconsistencies between the two projects can be

The Webapprootkey properties of a project are as follows:

<context-param>
<param-name>webAppRootKey</param-name>
<param-value>mywebtest.root1</param-value>
</context-param>

The Webapprootkey properties of Project B are as follows:

<context-param>
<param-name>webAppRootKey</param-name>
<param-value>myweb.root1</param-value>
</context-param>

Please note that if this attribute is not available under the Web. xml file of project B, add it.

When you deploy two projects under Tomcat, only one can access and another 404 error occurs, how to resolve

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.