November 2017
Intermediate to advanced
542 pages
14h 24m
English
The first step of updating the web.xml file is to remove it and replace it with javax.servlet.ServletContainerInitializer, which is the preferred approach to Servlet 3.0+ initialization. Spring MVC provides the o.s.w.WebApplicationInitializer interface, which leverages this mechanism. In Spring MVC, the preferred approach is to extend o.s.w.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer. The WebApplicationInitializer class is polymorphically o.s.w.context.AbstractContextLoaderInitializer and uses the abstract createRootApplicationContext() method to create a root ApplicationContext, then delegates it to ContextLoaderListener, which is registered in the ServletContext instance, as shown ...
Read now
Unlock full access