When MyEclipse deploys the project to tomcat, the solution for the class folder under WEB-INF is empty

When I usually work on a project, I occasionally encounter that after the project is published to Tomcat, there is nothing in the web-info/classes folder. There are three ways to solve this situation, which are recorded here.

PS: The three methods may not solve everyone's problems, but sometimes they can be solved. Just like the three methods that will be discussed later, sometimes one will solve it, sometimes two will work, and sometimes all three will not work. If you have other solutions, please leave a message, thank you!

 

The first one: Right-click on the project->Properties->Java Build Path->Source->Default ouput folder , and set it to the path of web-info/classes under Tomcat. For example, my project name is called test, then it is configured here as: test/WebRoot/WEB-INF/classes

 

The second:

The first step, select project on the menu bar of MyEclipse----- remove build automatically

The second step, select project----- clean-----check the project that does not generate class on the menu bar of MyEclipse , then OK

The third step, redeploy the project ----- check on build automatically ----- restart tomcat

 

The third type: Check the <classpathentry kind="output" path="WebRoot/WEB-INF/classes"/> of the .classpath file to see if the path is WebRoot/WEB-INF/classes . (PS: Sometimes the .classpath file cannot be directly seen because of the view, you can find it by Ctrl+Shift+R)

 

Finally, good luck to everyone!

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326319416&siteId=291194637