1

I am facing the exact problem stated Tomcat 404 error and tried all the suggestions but nothing has helped me fix this. Apache Tomcat 9.0 and Eclipse Oxygen is what I'm currently using now and following a tutorial from YouTube.

enter image description here

enter image description here

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
Mr. Nacho
  • 315
  • 1
  • 3
  • 13
  • `clean or build` your project and after it right click on index.html choose `run as server` option to run this application. I thing this will help you. – Sunil Nov 22 '17 at 12:20

5 Answers5

0

There is a problem with tomcat and the catalina config files:

what you have to do is simply:

  1. Right click on the server tomcat in eclipse
  2. Click on properties
  3. Click switch location a little server will appear on the left side in the navigation view
  4. Double click on it after you have launched your server
  5. Select use Tomcat installation and save

If that's an issue, it should solve the common problem.

Safeer Ansari
  • 772
  • 4
  • 13
  • These were the steps I followed earlier before asking here. I'm thinking that there might be something missing like the J2SE SDK? Should I need that? – Mr. Nacho Nov 22 '17 at 16:06
0

First try to reach index.html by typing it to URL

You must have a servlet that leads to this default page

xyz
  • 812
  • 9
  • 18
0

Just you need to switch the location of you tomcat properties

After that double double click on your server on eclipse and choose Use tomcat installation under the menu of server locations

M. Wajdi
  • 21
  • 2
0

I'd like to add one suggestion here if Tomcat is on Linux machine,

I have faced same issue. In my case Tomcat is deployed to a Linux system and i am not Admin User. When i am starting Tomcat with my account it was giving same error mentioned above. So once i started tomcat with admin account it stated working.

Shiv
  • 481
  • 6
  • 9
0

one more thing that worked for me:

==>add the @webServlet annotation to the class header. you can write any string in the parameter but preceded by "/"

enter image description here

Kennedy
  • 27
  • 8
  • 1
    Please don't use images for information that is easily communicated in text. Images are not friendly to search or copy & paste or visually impaired people. – fcdt Oct 03 '20 at 10:00