When Tomcat releases a project, enter the correct address in the browser and encounter 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:
Is the contents of <servle-mapping> and <servlet-class> in the web.xml file configured incorrectly?
1. Whether the names of the two are consistent 2. Whether the configured class exists 3. Whether the servlet class has not been compiled, so that the servlet class cannot be found;
Method: Check the class file corresponding to the servlet class in the project's class directory to see if it has been compiled and exist.
Usually there is no compiled class file.
Solution:
If Build Automaticlly is not enabled, eclipse enables Project->Bulid Automatically, and then re-deploys and releases. If there are no other errors, it can run normally after compilation.
Or, every time you release a deployment, manually click Project --Build Project to build the project!
Note: Build Automaticlly is used to automatically build projects
Thank you for reading, I hope it can help you. Thank you for your support for this site!