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).
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).
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).
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
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
My current configuration (I've tried several, same result):
maven setting.xml
<server>
<id>myTomcat</id>
<username>admin</username>
<password>admin</password>
</server>
</servers>
tomcat-users.xml
<?xml version='1.0' encoding='utf-8'?>
<tomcat-users>
<role rolename="manager-script"/>
<user username="admin1" password="admin" roles="manager-script"/>
</tomcat-users>
Pom:
<plugins>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.1</version>
<configuration>
<server>myTomcat</server>
<url>http://localhost:8080/manager/html</url>
<path>/${project.build.finalName}</path>
</configuration>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.4</version>
<configuration>
<warSourceDirectory>WebContent</warSourceDirectory>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>