Tomcat starts but Home Page does NOT open on browser with URL http://localhost:8080

Last updated
App Shah
Crunchify » Apache Tomcat Tutorials » Tomcat starts but Home Page does NOT open on browser with URL http://localhost:8080
how to solve Apache Tomcat 404 Page not found error?

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
Tomcat Click on Servers Tab and then double click on Tomcat Server

Step-2

  • New Apache Tomcat configuration page will open
  • Go to Server Location section
  • Select Use Tomcat installation (takes control of Tomcat installation)
Apache Tomcat Server Location Change to Fix 404 Error

Step-3

  • Save configuration
  • Restart Server by right clicking on tomcat server and click Restart
  • Visit http://localhost:8080 again and now you should see working tomcat page
Localhost 8080 - 404 not found apache tomcat error resolved

I hope this tutorial works well for you. Happy coding and keep visiting.

This tutorial works for Apache Tomcat 10.0 too.

Apache Tomcat 10 running fine on Mac

42 thoughts on “Tomcat starts but Home Page does NOT open on browser with URL http://localhost:8080”

  1. 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?

    Reply
  2. 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?

    Reply
  3. 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

    Reply
    • Hi Ashwini. What issue are you facing? Can you share some more light? Have you installed Chrome in Linux environment?

      Reply
  4. Thanks, this fixed the issue! Could you explain what causes this, though? i.e., why is this change required?

    Reply
  5. 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 .

    Reply
    • 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.

      Reply
  6. 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..

    Reply
    • 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.

      Reply

Leave a Comment