I am using Eclipse Neon and Tomcat server 9.0 and JDK 1.8 It was working well but unfortunately its giving me error 'Server Tomcat v9.0 Server at localhost failed to start.' I tried to change the ports i.e. connection port and other ports too but it did not solve my problem and this error is shown when I start the server or run the web app I am currently working on. Other solution other than change in port because I tried it and it did not resolve my problem?????
- 6Could you please post the logs / output from the eclipse concole?Gernot– Gernot2017-01-26 14:27:47 +00:00Commented Jan 26, 2017 at 14:27
- anyone figured this?Rahim Khoja– Rahim Khoja2017-03-06 05:58:30 +00:00Commented Mar 6, 2017 at 5:58
- 1. Check Runtime Environment JRE is mapped, if two JRE's exist select preferred one. 2. If you Configured a new Apache server you need to Restart Eclipse IDE once.UdayKiran Pulipati– UdayKiran Pulipati2022-09-12 09:19:54 +00:00Commented Sep 12, 2022 at 9:19
23 Answers
- Delete server by navigating to Window ->Show View -> Server. Right click on server and delete it.
- Delete Servers folder from Project Explorer
- Delete .metadata of eclipse workspace (CAUTION: You will lose all your workspace settings (e.g.: key bindings, appearance, ...))
- Now Restart eclipse and add Apache Tomcat server.
It will work.
2 Comments
I had the same problem, which was solved when I changed the admin port (right-click on the server inside eclipse and select properties) from a hyphen(default) to another port number. I used another port number for the admin port (not the same as the port number I used for my tomcat)


Hope it helps you Cheers
Comments
I had the same problem with Tomcat 9.xx and Eclipse. None of the given solutions helped me.
However, there is a missing step (for some of us) before recreating a new Server in Eclipse you may need to add the path to a jar file. The missing step was browsing to your /Tomcat-Directory/lib/servlet-api and adding servlet-api.jar
Steps:
1- Right click on the project you work on > Build Path > Configure Build Path > Libraries > Add External JARs
2- Select all JAR files from the Tomcat/bin and Tomcat/lib
3- Click "OK"
This made it work for me. I hope it will help you as well.
Thank you.
Comments
In my case, I had messed up up with my JAR files. My JAR files were corrupted. So delete existing JAR files and upload new JAR files. Hope this works. *Check 'Markers' tab for errors and warnings.
1 Comment
If you can't detect which project creates the problem then simply add and remove it in your server and run. If defective project is not anymore added to the server then server will run correctly. After detecting the problem you can simply follow the steps below.
If you are using data base connection with connection pooling then make sure @Resource(name="jdbc/dbName") is written before private DataSource dataSource in your servlet controller class. Just put it like this in your servlet controller class:
@Resource(name="jdbc/sakila") private DataSource dataSource; Comments
There was once I had messed around the server.xml file, and unwittingly added a Context tag telling the server to load a project I wasn't looking to load, and therefore had not compiled. That threw the Server Tomcat v9.0 Server at localhost failed to start, which went away after I deleted that.
Comments
- Go to directory (your workspace).metadata.plugins\org.eclipse.wst.server.core\tmp0\conf
- Open server.xml file on editor
- Delete
<Context docBase="(your workspace)\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\(your old project)" path="/(your old project)" reloadable="true" source="org.eclipse.jst.jee.server:(your old project)"/>
there might be some left over from your old project. so, only delete projects that have not been used or that were previously deleted. because if you delete one line then your server will be able to run but not with your project. because some of your project lines were deleted too.
Comments
There is a possibility that you are missing a "/" in your web.xml file probably in: <servlet-mapping></servlet-mapping>
<url-pattern> missing "/" before pattern name </url-pattern>
1 Comment
Just check your Console. Than search for relevant solution i did everthing, but ended up deleting a mapping error shown in console from web.xml
1 Comment
https://www.youtube.com/watch?v=SEO22ifq9qE&ab_channel=%23VhCode
Delete web.xml under WEB-INF of the selected project or correct everything in that file, then try restarting the server.
Comments
- Go to "Window" menu and select "Preferences".
- In the Preferences window, expand the "Java" section and select Installed JREs". Here, you should see a list of JREs that are currently installed on your system. Check if the JRE you are looking for is listed, or you can add it by clicking on the "Add" button and providing the path to the JRE installation directory.
Comments
This is the best solution. It worked for me.
Steps:-
1- Open the Servers tab from Windows » Show View » Servers menu.
2- Right click on the server and delete it
3-Create a new server by going New » Server on server tab.
4-Click on Configure runtime environments link.
5-Select the Apache Tomcat Server and remove it. This will remove the Tomcat server configuration.
6-Click on OK and exit the screen above now.
7-From the screen below, choose Apache Tomcat server and click on Next button:
8-Browse to Tomcat Installation Directory.
9-Click on Next and choose which project you would like to deploy:
10-Click on Finish after adding your project.
11-Now launch your Server.
