title: How to run webservice on tomcat from eclipse with maven project
body: <p>I'm currently trying to run a REST service for which I did the code of the services in java, and originally I was trying to get some  client to test it. My problem right now is that the tomcat does not work with any path other than home (I do see the main page of tomcat, but whenever I try to access to any defined path I get a 404).</p>
  
  <p>I've been trying this for several days, and I know there are a lot of posts about this because I've read a good amount of them, nevertheless, I don't know what I might be doing wrong, and at this point I would rather understand what is going on that simply fix it (not that I can right now anyway).</p>
  
  <p>My configuration right now is: eclipse mars with tomcat 6, 7 and 8 currently installed (first I only had 6, but it didn't work so as I tried more options I installed more versions). I have maven 3.3.1 plugin, and what I currently do is: create a maven project, add whatever facets I need (I have some code servlets I did I'd like to test, but even a path to a helloworld is giving me a 404). </p>
  
  <p>Then I right click maven install, then I try several things, all fail, main one that I think I should be doing is maven build with options deploy, so that the tomcat gets the war, and I can test the code. The problem is that when I manage to get a build success, I also get this message: 403</p>
  
  <p>I don't really mind what option I use as long as I use it in some tomcat, locally, and I can test the rest service I'm trying to build</p>
  
  <p>My current configuration (I've tried several, same result):</p>
  
  <p>maven setting.xml</p>
  
  <pre><code>&lt;server&gt;
       &lt;id&gt;myTomcat&lt;/id&gt;
       &lt;username&gt;admin&lt;/username&gt;
       &lt;password&gt;admin&lt;/password&gt;
   &lt;/server&gt;
    &lt;/servers&gt;
  </code></pre>
  
  <p>tomcat-users.xml</p>
  
  <pre><code>&lt;?xml version='1.0' encoding='utf-8'?&gt;
  &lt;tomcat-users&gt;
  
  &lt;role rolename="manager-script"/&gt;
  &lt;user username="admin1" password="admin" roles="manager-script"/&gt;
  &lt;/tomcat-users&gt;
  </code></pre>
  
  <p>Pom:</p>
  
  <pre><code>&lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.tomcat.maven&lt;/groupId&gt;
                  &lt;artifactId&gt;tomcat7-maven-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.1&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;server&gt;myTomcat&lt;/server&gt;
          &lt;url&gt;http://localhost:8080/manager/html&lt;/url&gt;
                      &lt;path&gt;/${project.build.finalName}&lt;/path&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.4&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;warSourceDirectory&gt;WebContent&lt;/warSourceDirectory&gt;
                      &lt;failOnMissingWebXml&gt;false&lt;/failOnMissingWebXml&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
  
              &lt;plugin&gt;
                  &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                  &lt;version&gt;3.1&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;source&gt;1.7&lt;/source&gt;
                      &lt;target&gt;1.7&lt;/target&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
  
          &lt;/plugins&gt;
  </code></pre>