List of usage examples for org.springframework.web.servlet DispatcherServlet DispatcherServlet
public DispatcherServlet(WebApplicationContext webApplicationContext)
From source file:org.springframework.xd.dirt.stream.StreamServer.java
@Override public void afterPropertiesSet() { this.scheduler.setPoolSize(3); this.scheduler.initialize(); this.tomcat.setPort(this.port); Context tomcatContext = this.tomcat.addContext(this.contextPath, new File(".").getAbsolutePath()); this.webApplicationContext.setServletContext(tomcatContext.getServletContext()); this.webApplicationContext.refresh(); Tomcat.addServlet(tomcatContext, this.servletName, new DispatcherServlet(this.webApplicationContext)); tomcatContext.addServletMapping("/", this.servletName); if (logger.isInfoEnabled()) { logger.info("initialized server: context=" + this.contextPath + ", servlet=" + this.servletName); }/*from ww w .j av a 2s. c om*/ }