3
votes

I am having issues properly setting up a dynamic web project in Eclipse [Juno] using Apache Tomcat 7.0. I have JRE and JDK 1.7 installed. These are the steps that I have taken:

  1. Tomcat files extracted to my C:\Program Files\ directory.
  2. New > Dynamic Web Project in Eclipse with target runtime [Apache Tomcat v7.0] and dynamic web module version [2.5].
  3. Created an index.jsp file in WebContent > WEB-INF.
  4. In Tomcat properties, set Server Location as Use Tomcat installation.
  5. Set the Deploy path as my Tomcat webapps location. In this case, C:\Program Files\apache-tomcat-7.0.41\webapps.
  6. Right-click project folder > Run As > Run On Server > Tomcat v7.0 Server at localhost

This results in a 404 error when I navigate to http://localhost:8080/ProjectName, but http://localhost:8080 successfully shows the Tomcat welcome page.

Are there any steps in between that I may be missing or any configuration options that I've neglected to adjust? I have another web project in my workspace from a while back that runs fine, but I've been unable to create a new dynamic web project successfully.

1

1 Answers

8
votes

Don't put the index.jsp in WEB-INF. Put it in WebContent.