Bump upstream versions
[neutron.git] / northbound-api / src / main / java / org / opendaylight / neutron / northbound / api / WebInitializer.java
index 51e8ad99c891e28533f047f33719ec2ffaf97f7f..a615d02343505cef0d4cdd54b2f07f2a9fee9b75 100644 (file)
@@ -17,6 +17,7 @@ import org.opendaylight.aaa.web.WebContextBuilder;
 import org.opendaylight.aaa.web.WebContextRegistration;
 import org.opendaylight.aaa.web.WebContextSecurer;
 import org.opendaylight.aaa.web.WebServer;
+import org.opendaylight.aaa.web.servlet.ServletSupport;
 
 /**
  * Initializer for web components.
@@ -29,14 +30,14 @@ public class WebInitializer {
     private final WebContextRegistration registraton;
 
     @Inject
-    public WebInitializer(WebServer webServer, WebContextSecurer webContextSecurer, NeutronNorthboundRSApplication app)
-            throws ServletException {
+    public WebInitializer(WebServer webServer, WebContextSecurer webContextSecurer, ServletSupport servletSupport,
+            NeutronNorthboundRSApplication app) throws ServletException {
         WebContextBuilder webContextBuilder = WebContext.builder()
             .contextPath("/controller/nb/v2/neutron").supportsSessions(true)
             // TODO confirm through testing that Jersey & Neutron are fine without sessions, and false instead true
 
             .addServlet(ServletDetails.builder()
-                    .servlet(new com.sun.jersey.spi.container.servlet.ServletContainer(app))
+                    .servlet(servletSupport.createHttpServletBuilder(app).build())
                     .addUrlPattern("/*").build());
 
         webContextSecurer.requireAuthentication(webContextBuilder, "/*");