How it works...
The DispatcherServlet is always declared as a typical <servlet> in any Tomcat servlet container. But more than a servlet, DispatcherServlet is the core servlet handler of any Spring MVC application which controls request dispatch processing and responses for each web transaction. It has a WebApplicationContext that manages @Controllers, @RequestMapping, and view resolvers for every HTTP/2 transaction.
To enable WebApplicationContext, DispatcherServlet must have a lookup configuration document known as the XML-based Spring definition file, which needs to be loaded to the servlet container also. In this project, ch02-servlet.xml serves as the root context definition file, which is just a typical ApplicationContext definition ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access