TOMCAT - HTTP Status 404 [duplicate]
Solution 1:
- Click on
Window > Show view > Server
or right click on the server in "Servers" view, select "Properties". - In the "General" panel, click on the "Switch Location" button.
- The "Location: [workspace metadata]" should replace by something else.
- Open the Overview screen for the server by double clicking it.
- In the Server locations tab , select "Use Tomcat location".
- Save the configurations and restart the Server.
You may want to follow the steps above before starting the server. Because server location section goes grayed-unreachable.
Solution 2:
To get your program to run, please put jsp files under web-content and not under WEB-INF
because in Eclipse the files are not accessed there by the server, so try starting the server and browsing to URL:
http://localhost:8080/YourProject/yourfile.jsp
then your problem will be solved.
Solution 3:
You don't have to use Tomcat installation as a server location. It is much easier just to copy the files in the ROOT folder.
Eclipse forgets to copy the default apps (ROOT, examples, etc.) when it creates a Tomcat folder inside the Eclipse workspace. Go to
C:\apache-tomcat-7.0.8\webapps
, R-click on the ROOT folder and copy it. Then go to your Eclipse workspace, go to the.metadata
folder, and search for "wtpwebapps". You should find something likeyour-eclipse-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps
(or../tmp1/wtpwebapps
if you already had another server registered in Eclipse). Go to thewtpwebapps
folder, R-click, and paste ROOT (say "yes" if asked if you want to merge/replace folders/files). Then reloadhttp://localhost/
to see the Tomcat welcome page.
Source: HTTP Status 404 error in tomcat