I am using javax.servlet.Registration to dynamically configure / register servlets.
I would like to know how to set up several vendor packages for Jersey . I can add one package using the setInitParamater method as follows:
public class MyWebInitalization implements WebApplicationInitializer { @Override public void onStartup(final ServletContext servletContext) throws ServletException {
To give you an idea of โโwhat I mean, this is the equivalent if I used web.xml:
<servlet> ... <init-param> <param-name>jersey.config.server.provider.packages</param-name> <param-value>com.package1;com.package2</param-value> </init-param> ... </servlet>
source share