
Today I was running Apache Tomcat from Eclipse and while accessing URL http://localhost:8080
found HTTP Status 404 – Not Found
error.
The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.
Do you have any of below questions?
- Tomcat starts but doesn’t display webpage
- Can’t connect to Tomcat even though it’s running
- How to Solve Common Tomcat Problems
- Can’t connect to localhost via browser. Can ping localhost
- How to open tomcat home page in browser
- localhost 8080 not working for tomcat
For all above types of issues, you are at right place.
I’ve setup Apache Tomcat by following detailed steps using in-depth tutorial.
Steps worked perfectly fine but as I didn’t have any projects added to tomcat webapps folder
it threw 404 error for me.
If you also face 404 Page not found error
then try following below steps:
Step-1
- Go to Eclipse IDE
- Click on
Servers
Tab - Double click on
Tomcat v9.0 Server at localhost

Step-2
- New Apache Tomcat configuration page will open
- Go to
Server Location
section - Select
Use Tomcat installation
(takes control of Tomcat installation)

Step-3
- Save configuration
Restart
Server by right clicking on tomcat server and clickRestart
- Visit
http://localhost:8080
again and now you should see working tomcat page

I hope this tutorial works well for you. Happy coding and keep visiting.
This tutorial works for Apache
Tomcat 10.0
too.

It was very usefull. It resolved my problem. Thank you
I’m trying this with Tomcat 9.0, but the Server Location portion is grey-ed out and can’t be changed. Is there a way to fix this?
I’m trying this with Tomcat 9.0, but the Server Location portion is grey-ed out and can’t be changed. Is there a way to fix this?
same problem
for me its grey too, i cant find anything
How did it work then?
It’S perfectly working. Thanks to you.
Hi,
I am facing the issue similar to this case. Where i try to setup the tomcat in HP-UX and started it. but when try to accessing URL http:// localhost:8080 or http:// localhost:8081 (i had try to setup 1 port and test, and change to another port for test) it show “This site ca’t be reached”.
We are not using any Eclipse, we are using command line because we are using HP-UX server.
Anyone have idea how to solve this by using command line?
Thank You. https://uploads.disquscdn.com/images/08dd671deea15d9d0d01db4a165f8a946292a46241c4ececef72fa9fb97f2cdd.png
Hi, I am facing the same issue. where the localhost:8080 or localhost:8081 show this site can’t reached.
But i am not using Eclipse, i am using command prompt because we are using HP-UX.
Is anyone know what is the issue cause this? https://uploads.disquscdn.com/images/08dd671deea15d9d0d01db4a165f8a946292a46241c4ececef72fa9fb97f2cdd.png
Thank You.
Thank you man, you saved the day.
Aaha. You are welcome. Happy to help!
thank you sir!
You are welcome Tolek. Happy to help!
Thanks, it helped me.
You are welcome Allan. Happy to help!
you are awesome…..tysm.
https://media2.giphy.com/media/yoJC2El7xJkYCadlWE/giphy.gif
tysm…it really helped me.
You are very Welcome Taniya! Happy to help.
Hi,
I have the same issue on Linux. How do I resolve this?
Hi Ashwini. What issue are you facing? Can you share some more light? Have you installed Chrome in Linux environment?
Thanks, this fixed the issue! Could you explain what causes this, though? i.e., why is this change required?
You are welcome Benjamin.
how to configure default local host setting for Jsp deployment .i didn’t install apache tomcat.i do configure default web server on mac , html is running but its not supported JSP page .
Hi Nivedita – Have you tried Embedded Web Server tutorial? I moved over to it since last 2 years for all my local development.
https://uploads.disquscdn.com/images/db4a252496e50bd925b90a49cc4e647e00a0c3fc7c83e292ee35f45235354922.jpg
the server locations section on my eclipse is greyed out. I can’t choose any of the options.
Hi Arwa. Could you try this?
1. Click on the Tomcat. Servers view
2. Delete all the webapps published under your server
3. Right click on the Server
4. Add and Remove and then remove manually the webapps
5. Right click on the server and Publish (the ’empty’ content).
This way you would un-gray the Server Locations area.
Hope this helps.
WHERE CAN I FOUND THE TOMCAT.SERVERS VIEW PLEASE TELL ME
I had the same problem last week. Apache Tomcat server page opening perfectly and even installing latest Eclipse & sql workbench I was unable to connect to sql database from eclipse. After a long try & search I got the solution that is unbelievable.(The problem was with old MySql connector. Maybe because of Latest IDE and latest Workbench doesn’t support old connector.) I download latest MySQL-J Connector version 8.0.18 and replace it in my Dynamic web project’s old connector. paste it in Web App Libraries and in Web-INF lib folder. Right click connector > Build Path > Configure build path. Right click on project > Build Path > Configure build path > select path of this new connector > apply. Now Run as > Run on server.. Database connected successfully..
This is great information Udayan.
I’m just wondering, are you adding MySQL-J Connector lib directly into your build path? There will be an issue if you move your project to another laptop/host and you have to copy and update path all the time.
Have you consider adding connector lib as a maven dependency? Having all dependencies into pom.xml file is the way to go.
If you are interested, then try How to create new simple Maven project from scratch tutorial.
It did the trick, thank you!
You are welcome Danielson. Happy to help. Happy coding and keep visiting.
LIFE SAVER, YOU ARE.
Aaha. Thanks Saaleem. Happy to help!
what kind of eclipse thats you use for it?
Hi there – I’m using Eclipse Enterprise Edition (EE).
Here is a detailed tutorial on how to setup Eclipse and Tomcat.
Thank you. This was very helpful.
You are welcome 🙂
Terima kasih banyak..
You are welcome!!
ty
You are welcome.