[404 error reported when deploying Java Web project in SAE], saejavaweb

Source: Internet
Author: User

[404 error reported when deploying Java Web project in SAE], saejavaweb

If you have any shortcomings, please kindly advise. Reprinted Please note: @ CSU-Max


Today, I wrote a small JavaWeb project and uploaded it to SAE. An error occurred while accessing it. Local testing is normal, and projects uploaded during platform development can be accessed normally. So it took two hours to finally find out the cause of the error.

The error message is as follows:
Error 404-Not Found. No context on this server matched or handled this request.
Contexts known to this server are

According to the information on the Internet, it may be that jar packages such as servlet-api.jar in the project conflict with the jar packages provided by the SAE platform. Then, package the project into a war package and delete the jar package under lib. Re-upload the test and the same error is returned.

The first step is not feasible. After deleting the servlet section in web. xml in the project, create an index. jsp page in the root directory and re-compile and upload the page.

Visible or java part of the problem, since the previous has ruled out the servlet-api.jar and other jar package conflicts, then what is the other reason?

After searching on the internet, we found that the jdk version used for compilation may be incorrect. The problem is that the jdk version on the local machine is 1.7, and jdk 1.6 is required to use SAE, so jdk 1.6 is replaced, and then re-compiled and uploaded. The test is normal.

It turns out that the project that was previously uploaded to SAE was normally accessed because the jdk version on the current machine was 1.6. The jdk version on the current machine is 1.7.


**************************************** ****************************************

** Reprinted please indicate the source: @ CSU-Max http://blog.csdn.net/csu_max **

**************************************** ****************************************




Error 404 in java Web project

Generally, you can delete the project in tomcat and redeploy it.

Or delete all jobs and restart them.
If you cannot delete tomcat again, it is absolutely OK to copy a tomcat again ,.

After running Java web project Tomcat, the jsp interface is not displayed, and the project is successfully deployed under webapps. Error 404 is reported,

Is the access address incorrect?

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.