Don't put folder1
in the url-pattern
. You've already put folder1
in the packages being scanned for services. By putting folder1
in the url-pattern
, you are indicating that you want it to be in the URL. Put whatever you want the URL to be in there. So
<servlet-mapping>
<servlet-name>jersey-servlet</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
This should make all calls go to your rest services. However, you should probably put some path in there because you don't want to map all of your URLs to REST services (since there will be other URLs that are not REST services). Maybe something like
<servlet-mapping>
<servlet-name>jersey-servlet</servlet-name>
<url-pattern>/services/*</url-pattern>
</servlet-mapping>