Beruflich Dokumente
Kultur Dokumente
Spencer Uresk
Notes
Objectives
What is MVC?
Benefits of MVC
DispatcherServlet
[1] Copyright 2004-2010 Rod Johnson, Juergen Hoeller, et al. See copyright
slide for full copyright information.
Step 3, Continued
Step 3, Continued
Hierarchy of Contexts
Context Hierarchy
a
Application
Context
b
c
DefaultWebCont
ext
/
GWT Context
/*.gwtrpc
Web Services
/ws/
Simple Controller
Request/Response objects
Session object
Springs WebRequest object
java.util.Locale
java.io.Reader (access to request content)
java.io.Writer (access to response content)
java.security.Principal
ModelMap
org.springframework.validation.Errors
org.springframework.validation.BindingResult
@PathVariable
@RequestParam
@RequestHeader
@RequestBody
The Model
ModelMap
ModelAndView
User:
Wed
consume it in our JSP like this:
${user}<br /><br />
Other User: ${otherUser}
Next Steps
Sources
http://en.wikipedia.org/wiki/Model%
E2%80%93view%E2%80%93controller
http://
en.wikipedia.org/wiki/Spring_Framewor
k#Model-view-controller_framework
http://static.springsource.org/spring/d
ocs/3.0.x/spring-framework-reference/ht
ml/mvc.html
Copyright Notice