Tomcat error: wrapper cannot find servlet class Problem solving

When Tomcat publishes the project, enter the correct address in the browser, and the following problems are encountered:

HTTP Status 500 -

javax. servlet. ServletException: Wrapper cannot find servlet class xxx or a class it depends on

....

....

java. lang.ClassNotFoundException: xxx

....

...

Problem analysis:

web. Whether the < servlet mapping > and < servlet class > contents in the XML file are configured incorrectly,

1. Whether the two names are consistent 2 3. Whether the configured class exists Whether the servlet class fails to compile so that the servlet class cannot be found;

Method: check the class file of the corresponding servlet class in the class directory of the project to see if it has been compiled and exists.

Usually, there is no compiled class file.

Solution:

If build automatically is not enabled, eclipse starts project - > bulid automatically, and then redeploys and publishes. If there are no other errors, it can run normally after compilation.

Or manually click Project -- build project to build the project every time you publish the deployment!

Note: build automatically is used to automatically build projects

Thank you for reading, hope to help you, thank you for your support to this site!

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>