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.
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, "/*");