cdm-vaadin / src / main / java / eu / etaxonomy / cdm / vaadin / CdmAppInitializer.java.bkp @ 57bddc87
History | View | Annotate | Download (1.13 KB)
1 | ead0a1ab | Cherian Mathew | package eu.etaxonomy.cdm.vaadin; |
---|---|---|---|
2 | |||
3 | import javax.servlet.ServletContext; |
||
4 | import javax.servlet.ServletException; |
||
5 | import javax.servlet.ServletRegistration; |
||
6 | |||
7 | import org.springframework.web.WebApplicationInitializer; |
||
8 | import org.springframework.web.context.ContextLoaderListener; |
||
9 | import org.springframework.web.context.support.XmlWebApplicationContext; |
||
10 | import org.springframework.web.servlet.DispatcherServlet; |
||
11 | |||
12 | public class CdmAppInitializer implements WebApplicationInitializer { |
||
13 | |||
14 | @Override |
||
15 | public void onStartup(ServletContext servletContext) throws ServletException { |
||
16 | //FIXME : This config seems to be identical to the web.xml config, but it does not work |
||
17 | |||
18 | // XmlWebApplicationContext appContext = new XmlWebApplicationContext(); |
||
19 | // appContext.setConfigLocation("/WEB-INF/applicationContext.xml"); |
||
20 | // servletContext.addListener(new ContextLoaderListener(appContext)); |
||
21 | // |
||
22 | // ServletRegistration.Dynamic dispatcher = servletContext.addServlet("cdm-vaadin", DispatcherServlet.class); |
||
23 | // dispatcher.setLoadOnStartup(1); |
||
24 | // dispatcher.addMapping("/"); |
||
25 | } |
||
26 | |||
27 | } |