For Jersey 2.x
In web.xml.
The <servlet-classs> and <init-param> <param-name> must match!
That is,
"org.glassfish.jersey.servlet.ServletContainer "
must correspond to
" jersey.config.server.provider.packages"
Sample snippet from web.xml file
....
<servlet>
<servlet-name>XYZ123</servlet-name>
<servlet-class>
org.glassfish.jersey.servlet.ServletContainer
</servlet-class>
<init-param>
<param-name>
jersey.config.server.provider.packages
</param-name>
<param-value>YOU PACKAGE</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
In web.xml.
The <servlet-classs> and <init-param> <param-name> must match!
That is,
"org.glassfish.jersey.servlet.ServletContainer "
must correspond to
" jersey.config.server.provider.packages"
Sample snippet from web.xml file
....
<servlet>
<servlet-name>XYZ123</servlet-name>
<servlet-class>
org.glassfish.jersey.servlet.ServletContainer
</servlet-class>
<init-param>
<param-name>
jersey.config.server.provider.packages
</param-name>
<param-value>YOU PACKAGE</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
...
Comments
Post a Comment