Accepted answer
  1. click on window > show view > server or right click on the server in "servers" view, select "properties".
  2. in the "general" panel, click on the "switch location" button.
  3. the "location: [workspace metadata]" should replace by something else.
  4. open the overview screen for the server by double clicking it.
  5. in the server locations tab , select "use tomcat location".
  6. 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.

server locations in eclipse view


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 like your-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 the wtpwebapps folder, r-click, and paste root (say "yes" if asked if you want to merge/replace folders/files). then reload http://localhost/ to see the tomcat welcome page.

source: http status 404 error in tomcat


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:


then your problem will be solved.

Related Query

More Query from same tag