What is @requestController and DispatchServlet?

+1 vote
asked Jun 12, 2017 in JAVA by anonymous

   Any one give clear explain about @requestCOntroller and dispatchServlet

1 Answer

0 votes
answered Jun 12, 2017 by admin (8,135 points)

Request Controller and DispatchServlet

Dispatcher Servlet is used to handle all incoming requests and route them through Spring. When DispatcherServlet receives a web request, it determines which controllers should handle the incoming request.

It first scans for all classes that are declared with the @Controller annotation. The dispatching process depends on the various 

@RequestMapping annotations declared in a controller class and its handler methods. There are three levels of request mapping can be defined in Spring controller.