wtpwebapps/myapp is empty when running Tomcat under Eclipse
Solution 1
your files must be somwhere, so start searching in:
<YOUR_WORKSPACE_DIR>\.metadata\.plugins\org.eclipse.wst.server.core\tmp<SOME_NUMBER>\wtpwebapps
Solution 2
I had a similar problem, when updating our project (.project
and .classpath
are checked in for convenience, but causes sometimes problems).
Console-Log in eclipse always says:
Error configuring application listener of class org.sth.ThisClass
java.lang.ClassNotFoundException: org.sth.ThisClass
The reason was that $WORKSPACE_DIR/.metadata/.plugins/org.eclipse.wst.server.core/tmp$NUMBER/wtpwebapps/$CONTEXT/WEB-INF/lib/classes
was empty. The solution was to enter under Project Properties > Deployment Assembly
an entry:
Source: /src
Deploy Path: WEB-INF/classes
Solution 3
If you use a Maven in your project, this is a solution for you:
- Delete the project(s) in the Eclipse.
- create project from Maven sources (select your workspace directory).
- Check found pom.xml to import.
Restart the Tomcat.
![Momo](https://i.stack.imgur.com/iduy0.jpg?s=256&g=1)
Momo
Updated on June 17, 2022Comments
-
Momo about 2 years
I know that tomcat is running because when I type http://localhost, the tomcat page dispay. My problem is I can't figure out why the wtpwebapps/myapp is empty, is like the eclipse doesn't publish it and when i type http://localhost/myapp, I get 404 error.
In the server overview :
- Server Location is set to "Use Tomcat installation" | server path: the servers's folder | deploy path : wtpwebapps
- Server Option : Publish module contexts to separate XML file
- Publishing : Automatically publish when ressource change
I use eclipse Ganymede 3.4.2, tomcat 6.0, under Win7
Any help would be appreciated, thanks