title: Eclipse deploys content of WebContent folder to WEB-INF folder.
body: <p>I encounter a strange behaviour of the Eclipse <code>Run on Server</code> feature. My environment: </p>
  
  <ul>
  <li><code>Eclipse Kepler SR 1, WTP</code></li>
  <li><code>Apache Tomcat 7.0.37</code></li>
  </ul>
  
  <p>I have two dynamic web projects inside Eclipse - <code>ProjectA</code> and <code>ProjectB</code>. Both have an <code>index.xhtml</code> file (indeed both projects are JSF projects) directly below the <code>WebContent</code> folder. When I export them as <code>WAR</code>files to the <code>Tomcat webapps</code> folder of the Tomcat installation, both run fine. When I run <code>ProjectA</code> on the Tomcat server managed by Eclipse through <code>Run on Server</code> feature, everything is also fine. But when I want to start <code>ProjectB</code> from Eclipse through <code>Run on Server</code> I get a <code>404 error</code> when accessing the <code>http://localhost:8080/ProjectB/index.xhtml</code> or respectively an <code>index.xhtml Not Found in ExternalContext as a Resource</code> error from the JSF servlet when accessing the resource through the correct <code>http://localhost:8080/ProjectB/faces/index.xhtml</code> URL. (All URLs starting with <code>/faces/</code> are matched to the <code>JSF Servlet</code>. </p>
  
  <p>Looking at the deployed application in the Tomcat folder in the Eclipse Workspace ( <code>&lt;eclipse-workspace&gt;\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps</code>) reveals the cause:<br>
  For <code>ProjectB</code> the content of the Eclipse projects <code>WebContent</code> folder has been deployed to the <code>WEB-INF</code> folder instead to the root folder of the projects deployment. The application server of course can not find the resource. </p>
  
  <p>The question is - <strong>Why does the deployment fail and how can I avoid this?</strong> </p>
  
  <p>I even checked the <code>Deployment Assembly</code> property of both projects inside eclipse. Both have the same (default) source-to-destination-folder mapping. Here is the content of the <code>.settings\org.eclipse.wst.common.component</code> file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;project-modules id="moduleCoreId" project-version="1.5.0"&gt;
  &lt;wb-module deploy-name="ProfileAndGroupManagementGUI"&gt;
      &lt;wb-resource deploy-path="/" source-path="/WebContent" tag="defaultRootSource"/&gt;
      &lt;wb-resource deploy-path="/WEB-INF/classes" source-path="/src"/&gt;
      &lt;property name="context-root" value="ProfileAndGroupManagementGUI"/&gt;
      &lt;property name="java-output-path" value="/ProfileAndGroupManagementGUI/build/classes"/&gt;
  &lt;/wb-module&gt;
  </code></pre>
  
  <p></p>
  
  <p>Strange, isn´t it? Anyone any idea? </p>