spring mvc

  • Transition 1 – User sends request to server by submitting form / by clicking hyperlink etc. Request is initially given to WEB.XML.
  • Transition 2 – WEB.XML routes request to DispatcherServlet by looking at <servlet-mapping> tag.
  • Transition 3 – Inside DispatcherServlet, First ‘HandlerMapping’ handed over request to suitable ‘Controller’.
  • Transition 4 – Controller maps request to proper Model class. All BUSINESS LOGIC is done inside Model class.
  • Transition 5 – If database operation is needed then Model class will route request to suitable DAO. All database operations should be carried out in DAO.
  • Transition 6 – If needed then attach attributes into request/session/application scope and return back to Model.
  • Transition 7 – If needed then attach attributes into request/session/application scope and return back to Controller.
  • Transition 8 – Controller simply returns it to any View(JSP/HTML etc).
  • Transition 9 – JSP/Html is viewed back to user.

ref: http://www.goospoos.com/2009/12/spring-mvc-application-flow-with-diagram/

posted @ 2015-05-10 00:18  wonkju  阅读(107)  评论(0编辑  收藏  举报