Saturday, 7 September 2013

Spring MVC working Flow

  • By using URL/From jsp we are sending request

  • This request will come to web.xml file and execute DispatcherServlet

  • It is the responsibility of DispatcherServlet to identify perticular HandlerMappings

  • By using HandlerMapping DispathcerServlet will search for requested url path matching in spring configuration file/Spring Configuration class

  • If it is available,DispatcherServlet will call methods in our Controller

  • Controller process the request,get the data form form,store into pojo class/javabean,if required perform validations

  • And then Controller returns ModelAndView object with data/errors and jsp name

  • DispatcherServlet take the ModleAndView object and stored in scoped variables

  • Based on the jsp name returned by Controller,DispatcherServlet will find out jsp by using ViewResolver(InternalResourceViewResolver)

  • Finally loginpage/successpage/failure page send to clietnt/jsp/other

  • By using scoped variables we can display the data/errors

  • No comments:

    Post a Comment