If you can't read please download the document
Upload
yukio
View
176
Download
3
Embed Size (px)
DESCRIPTION
第 21 章 Spring 的 MVC 框架. Spring 不但一个很好的集成框剪,它还提供了构建 Web 应用程序的全功能 MVC 模块。 Spring 的 MVC 框架非常强大并不逊色于其他专业的 Web 框架,如 Struts 、 WebWork 。但在国内 Spring MVC 应用的并不是特别多,原因可能是 Struts 太深入人心的缘故吧。 虽然 Spring MVC 并不是本书的重点,但了解它的结构和原理也是十分有好处的。. 21.1 Spring MVC 简介. - PowerPoint PPT Presentation
Citation preview
21 Spring MVCSpringWebMVCSpring MVCWebStrutsWebWorkSpring MVCStrutsSpring MVC
21.1 Spring MVCSpringMVC Web JSPVelocityTilesiTextSpring MVC
21.1.1 Spring MVCSpringwebDispatcherServletDispatcherServletSpringwebhandlerviewlocalthemeControllerModelAndView handleRequest(request response)SpringAbstractControllerAbstractCommandControllerSimpleFormController
21.1.2 Spring Web MVCSpring Web MVCcontrollervalidatorcommand objectform objectmodel objectServletDispatcherServlethandler mappingview resolver JavaBeancontextcontextJavaBeanwebvalidator
21.1.2 Spring Web MVCActionFormbinding validationhandler mappingview resolutionSpringURLMVCSpring
21.1.2 Spring Web MVCmodelSpringwebMap/themeJSPSpringJSTLVelocitySpring BeanHTTP RequestHTTP SessionSpring MVCSping MVCWebApplicationContext
21.2 DispatcherServletwebSpringwebwebservletwebSpringDispatcherServletSpringIoCSpring
21.2.1 WebDispatcherServletDispatcherServletServletServletDispatcherServletwebweb.xmlDispatcherServletweb.xmlurl-mapping21-1DispatcherServlet
21.2.2 BeanDispatcherServletDispatcherServletDispatcherServlet1WebApplicationContextWebApplicationContextDispatcherServlet.WEB_APPLICATION_CONTEXT_ATTRIBUTE2localResolver
21.2.2 Bean3SpringMultipartHttpServletRequest45WebApplicationContext
21.2.3 Spring WebWebApplicationContextwebApplicationContextApplicationContextservletServletContextWebApplicationContextServletContextRequestContextUtilsWebApplicationContextSpringDispatcherServletbeanbeanSpringWebApplicationContextbeanbeanDispatcherServletbeanSpring
21.3 ControllerMVCWebActionSpring MVCControllerSpringSpringControllerControllerControllerSpring
21.3.1 AbstractController SpringAbstractController AbstractController mimetypeAbstractController
21.3.2 AbstractControllerControllerSpringController1MultiActionController(action)2CommandControlle.rSpringSpring MVC3SimpleFormController form cotnrollerform
21.4 handler mappingweb(handler)HandlerMappingHandlerExecutionChainHandlerExecutionChainDispatcherServletHandlerExecutionChainDispatcherServlet(interceptor)
21.5 Spring WebModelAndViewSpringSpringJSPVelocityXSLTViewResolverSpringViewResolverViewSpring
21.6 SpringWebSpringSpringStruts2
21.6.1 SpringSpringspring.jardescriptor) spring-form.tldJSPform
21.6.2 SpringStruts2Springweborg.springframework.ui.context. ThemeSourceWebApplicationContextThemeSourceThemeSourceThemeSourceorg.springframework.ui.context.support.ResourceBundleThemeSourceclasspath/WEB-INF/classes
21.7 MVCSpring MVC ID JSP
21.7.1 Web.xmlWebWeb.xmlStrutsSpringWebServlet
21.7.2 ControllerLoginBankController Spring MVC SimpleFormControllerSimpleFormContoller HTTP GET HTTP POST LoginBankControllerAuthenticationServiceAccountServicesAuthenticationService AccountServices 21-9AuthenticationServiceAccountServices LoginBankController
21.7.3 Spring MVC JSPInternalResourceViewResolverJSPJSTL/jsp/login.jspviewClassJstlView sampleBanking-services.xml
org.springframework.web.servlet.view.JstlView /jsp/ .jsp
21.7.4 JSPJSP
21.7.5 WebTomcatwebappsWebspringbankingWEB-INF/classesSpringjarWEB-INF/libsampleBanking-services.xmlsampleBankingServlet-servlet.xmlweb.xmlWEB-INF
21.8 Spring MVC2.5Spring 2.0Spring MVCSpring 2.5Spring MVCController XML ControllerPOJOControllerSpring MVC.SpringSpring MVC MVC
21.8.1 ControllerController org.springframework.web.servlet.mvc.Controller SimpleFormController MultiActionController Controller Controller Spring MVC HandlerMapping
21.8.2 Spring MVC Spring MVC beanXMLAnnotationMethodHandlerAdapterBeanSpring MVCBeanBean URL Spring2.5p
21.9 SpringMVCSpringSpringMVCWebStrutsWebworkActionControllerSpringMVCSpring MVCSpringIoCAOPMVCSpringSpringMVC