Sorry my bad, I provided an incorrect list.
jersey-container-servlet-core.jar
jersey-server.jar
jersey-common.jar
javax.ws.rs-api-2.0.1.jar
hk2-api-2.5.0-b32.jar
jersey-guava-2.25.1.jar
javax.inject-2.5.0-b32.jar
hk2-utils-2.5.0-b32.jar
hk2-locator-2.5.0-b32.jar;
javax.annotation-api-1.2.jar
javassist-3.20.0-GA.jar
jersey-client.jar
validation-api-1.1.0.Final.jar
jersey-entity-filtering-2.25.1.jar
jersey-media-json-jackson-2.25.1.jar
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.servlet.DefaultServlet;
import org.eclipse.jetty.servlet.ServletContextHandler;
import org.eclipse.jetty.servlet.ServletHolder;
import org.eclipse.jetty.util.component.AbstractLifeCycle;
import org.eclipse.jetty.util.component.LifeCycle;
public class AdminWebServer extends AbstractLifeCycle
{
.....
@Override
protected void doStart() throws Exception
{
.....
super.doStart();
loader = new AdminWebServerLifeCycleXmlLoader( getConfig() );
LifeCycle[] lifeCycles = loader.getLifeCycles();
if( lifeCycles != null && lifeCycles.length > 0 )
{
for( LifeCycle lifeCycle : lifeCycles )
{
if( lifeCycle instanceof Server )
{
ServletContextHandler context = new ServletContextHandler( ServletContextHandler.SESSIONS );
context.setContextPath( "/" );
( (Server) lifeCycle ).setHandler( context );
ServletHolder jerseyServlet = context.addServlet( org.glassfish.jersey.servlet.ServletContainer.class, "/api/*" );
jerseyServlet.setInitOrder( 1 );
jerseyServlet.setInitParameter( "jersey.config.server.provider.packages", "com.web.webapi" );
// add security filter
jerseyServlet.setInitParameter( "jersey.config.server.provider.classnames", SecurityFilter.class.getName() );
// static content/ui artifacts served from the /static directory
ServletHolder staticServlet = context.addServlet( DefaultServlet.class, "/*" );
staticServlet.setInitParameter( "resourceBase", "./static/" );
staticServlet.setInitParameter( "pathInfoOnly", "true" );
staticServlet.setInitParameter( "dirAllowed", "false" );
}
}
}
loader.start();
....
}
...
}
Thanks again ..