Accepted answer

The easiest solution (and what worked for me) was to delete my tomcat server from the "Servers" view in Eclipse, then create a new server and add all the appropriate modules to it.

Sometimes tomcat gets confused and the easiest/least time consuming way to resolve things is to start over.


Try , right click tomcat --> Add / Remove , then in opened window , remove All projects in Configured side..

Then restart tomcat .


Before adopting any other solution, make sure that the project is open.


Go to Tomcat Manager Select web app -> undeploy it


Today I was working with some other project and getting some errors in starting server (tomcat7), so first I cleaned the server and tried but no luck, then I deleted the server and made new one.

The project on which I was working was started working fine, but another project started giving me the same exception, I again deleted the server and tried but the same case, even I was unable to hit the tomcat landing page i.e. localhost:8888/. I really don't know how and why all that happened.

I tried several things like clean,add/remove then I started searching SO.

After some research I thought to give one more chance then I started server again this time both of my projects started working fine but still getting 404 on tomcat page


As a trivial problem, the project that you're trying to start can be closed (this could be missable, if you have many projects into the workspace!). Just do right click -> Open Project, in this case.

enter image description here


I came across this problem today, then solve it by editing the server.xml in directory of %tomcat_home%\conf, just as below:

<Context docBase="E:\apache-tomcat-7.0.52\webapps\ROOT" path="/ROOT" reloadable="true" source="org.eclipse.jst.j2ee.server:pc-ui"/>

I don't know whether it is MyEclipse that have genarated the "Context" element in element of "Host", but I change it according to the error info diaplayed in IDE console.


I got this error a few times. I got it because my project wasn't building correctly after running the "mvn eclipse:eclipse" line. Make sure your project is being built correctly, then add and remove the project from the server.


This could happen if you execute maven to build a java project

mvn eclipse:eclipse 

Instead of executing maven to build a web java project as:

mvn eclipse eclipse -Dwtpversion=2.0


You can look into tomcat\conf\Catalina\localhost,if you can see the xml file which its name matches your error message.You can just delete the xml file and restart your tomcat.


I had to remove an offending project/module from the tomcat config view, under the modules tab.


i have solved this error by adding removing and adding again the jar files from WebContent/WEB-INF/lib folder. and i did the same in properties of project ie(Right click on project->Build Path->configure build Path) by selecting Add External Jar option.


I got this problem when I imported a project and run it with Tomcat. I fixed it when I opened .project file and added some code:



Happened to me a couple of times.

Windows > Show view > Servers>

A List of servers will be displayed at bottom Right click on it and delete.

Now while running your project, Manually re select the server from list of existing servers and run.


Looking at the exception you get, this looks like a problem with publishing your WEB-App (eg. Eclipse WTP could mess something up). First things that come in my mind:

Check your Tomcat server settings: go to Servers - double click on your server. Get your 'Server Locations - Server Path' and check if it exists and check the user/group read/write permissions. eg. ls -lh somepath/.medadata/.plugins/.org.eclipse.wst.server.core/tmp0 You must be owner or at least in same group for the folder.

Clean the eclipse workspace. (Project - clean all)

Clean/Republish your wep-app (right click on server, clean, publish).

Check if the application is published, there should be a folder named Preventini in /home/claudio/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/ Also check the permissions here again (see above).


This could happen because "Tomcat\conf\Catalina" folder. Please delete this folder.


If using Eclipse STS

  1. open the server view

  2. select the server that you're trying to publish to

  3. right click -> clean

I had this problem come up a couple of times and this always seemed to fix it. I suppose the other solutions work too but they seem more complicated to me.

enter image description here


This might be late but for the benefit of the those who might encounter the same problem in the future, I'll share what I experienced.

I got this problem after I deleted the WebContent folder of the Dynamic Web Project I just created in place of webapp folder which is the standard folder of my company. I found out that, in Project Properties > Deployment Assembly, WebContent folder is still used as the root of the web application (Deploy Path : "/"). Thus, Eclipse doesn't copy the project to .metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps because the root specified in Deployment Assembly does not exist anymore.

I fixed it by editing that entry then correcting it with the folder I am using in place of the default WebContent (the webapp folder)


I had the same problem using Tomcat 7 & Eclipse Mars.
I solved it as follows:

  • stop Tomcat
  • open server.xml

    Ctrl + Shift + R > type "server.xml" > Open

  • search for "<Context docBase"

    Ctrl + F > type "<Context" > Find

  • remove all <Context .../> tags from here:

    <?xml version="1.0" encoding="UTF-8"?>
    <Server port="8005" shutdown="SHUTDOWN">
        <Service name="Catalina">
            <Engine defaultHost="localhost" name="Catalina">
                <Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="true">
                    <!-- Remove the following lines! -->
                    <Context docBase="App1" path="/App1" reloadable="true" source="org.eclipse.jst.j2ee.server:App1" />
                    <Context docBase="App2" path="/App2" reloadable="true" source="org.eclipse.jst.j2ee.server:App2" />
    • probably at the end of the last line that has to be removed is </Host> (don't remove </Host>!)
  • Go to Servers tab > right click on the project(s) > Remove > OK


  • Right click on the project > Run As > Run on Server > Finish

    Now it should work!
    If you check the server.xml file, you'll see that a new correct "<Context ... />" line was generated.


i have the same error, just run this maven command repeatedly and solve the problem.

mvn eclipse:clean eclipse:eclipse -Dwtpversion=2.0

eclipse was not recognizing that this was a web project, so never deploy the application.

Related Query

More Query from same tag