when i'm deploying app glassfish 3, there is:
info: scanning root resource , provider classes in web app resource paths:
and in case use:
<servlet-class>com.sun.jersey.spi.container.servlet.servletcontainer</servlet-class>
in web.xml, fine. providers , root resources classes found.
but when same app deploying glassfish 4, there no "scanning" providers , root resource classes, , causes classes not registered. 1 change servlet class to
org.glassfish.jersey.servlet.servletcontainer
wich glassfish4 familiar. why happen? should force scanning?
add web.xml.
<web-app> <servlet> <servlet-name>jersey web application</servlet-name> <servlet-class>org.glassfish.jersey.servlet.servletcontainer</servlet-class> <init-param> <param-name>jersey.config.server.provider.packages</param-name> <param-value>org.foo.rest;org.bar.rest</param-value> </init-param> ... </servlet> ... </web-app>
Comments
Post a Comment