Configuration and idea: I have maven 3.3, eclipse mars, tomcat v8, and want to deploy first a simple helloworld servlet and then my own code to test it.
I've been trying for some days to do this, I couldn't even get into apache main page, and just now got it configured right so I see my web service in the manager webapp. However, it's giving me 404 status for a helloworld, which is not something I expected.
So I wanted to know what should I try next. I have the code, I see it deployed in tomcat, tomcat is working, but nothing rest/servlet related works, it's just 404 status.
I'm trying to access mainly through this two combinations of paths:
http://localhost:8080/connectedCar/
http://localhost:8080/connectedCar/rest/helloworld
pom:
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-server</artifactId>
<version>1.9</version>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-server</artifactId>
<version>1.17.1</version>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-core</artifactId>
<version>1.17.1</version>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-servlet</artifactId>
<version>1.17.1</version>
</dependency>
</dependencies>
web.xml:
<servlet>
<servlet-name>connectedCar</servlet-name>
<servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
<init-param>
<param-name>jersey.config.server.provider.packages</param-name>
<param-value>pruebaCC.connectedCar</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>connectedCar</servlet-name>
<url-pattern>/rest/*</url-pattern>
</servlet-mapping>
tomcat users:
<?xml version="1.0" encoding="UTF-8"?>
<tomcat-users>
<!--
<role rolename="tomcat"/>
<role rolename="role1"/>
<user username="tomcat" password="tomcat" roles="tomcat"/>
<user username="both" password="tomcat" roles="tomcat,role1"/>
<user username="role1" password="tomcat" roles="role1"/>
-->
<role rolename="manager-gui"/>
<user username="admin" password="admin" roles="manager-gui"/>
</tomcat-users>
setting.xml:
<server>
<id>tomcatserver</id>
<username>admin</username>
<password>admin</password>
</server>