404 при вызове конечной точки REST Джерси 2 на Glassfish
Это мой web.xml
<servlet>
<servlet-name>Simulator HTTP API</servlet-name>
<servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Simulator HTTP API</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
</web-app>
и это мой простой веб-сервис:
@Path("partner")
public class PartnerAPI {
@Path("/mt")
@GET
@Produces(MediaType.TEXT_PLAIN)
public String sendMT() {
return "Sent";
}
}
когда я называю это так:
http://localhost:8080/myprojectname/partner/mt
я получаю ошибку 404 не найден, что я делаю не так?
Обновитьэто мой мавен
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-server</artifactId>
<version>2.22.1</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-common</artifactId>
<version>2.22.1</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-client</artifactId>
<version>2.22.1</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet</artifactId>
<version>2.22.1</version>
</dependency>