MAVEN Project Tomcat Controller 404

Source: Internet
Author: User

Today, using tomcat7.0.54 to start an existing MAVEN project, you can start normally, but all of your @controller comments are reported with a 404 error, and the next step is to troubleshoot the problem.

1. Starting to think it is the source problem, is not because of a key configuration dropped, so the current 404 error? But the same source code, there is no problem with colleagues, so that the source code is not a problem.

2. What is the problem? Get a working war package generated by colleagues, and deploy your own war packages and colleagues ' war packages locally, and find your own 404, compare the resulting file contents, and discover the web-inf/in the war package. The Lib folder has more dependent jar files, such as Maven dependencies, and the projects that you build don't have jar packages. The problem is positioned successfully, and here is the solution.

Right-click on the project-Properties-deployment assembly, found no MAVEN dependencies related items, add, and then run successfully.

Final result

MAVEN Project Tomcat Controller 404

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.