So I'm getting this error 404 in a simple hello world servlet program, when I right click on the project name and then run it on tomcat server (in eclipse). However when I right click on servlet file in the project explorer and then run it on the server it runs perfectly well. Why wont it run by using the former procedure? former procedure
Asked
Active
Viewed 28 times
1 Answers
0
Error 404 caused when Tomcat is not finding the servlet or path is incorrect. In your screen shot I am seeing http://localhost:8080/testproject
that displaying 404 error whereas http://localhost:8080/testproject/World
working.
you are providing directory path but not writing servlet name that causes

Ghayel
- 1,113
- 2
- 10
- 19