tomcat error: Wrapper cannot find servlet class... Problem solving

  • 2020-05-16 06:57:59
  • OfStack

When tomcat published the project, it entered the correct address in the browser and encountered the following problems:

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. xml file < servle-mapping > and < servlet-class > Whether the content is misconfigured,

1. Whether both name are 1 to 2. Whether the configured class exists; 3.

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

It is common to see class files that do not exist for compilation.

Solutions:

If Build Automaticlly is not turned on, eclipse turns on Project- > Bulid Automatically, redeploy the release, and if there are no other errors, it will run normally after compiling.

Or manually click Project--Build Project build project every time you release a deployment!

Note: Build Automaticlly is used for automatic build projects

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


Related articles: