2. Goals
• Modernize the code-base from SpringMVC 2.0
to SpringMVC 2.5 with the end goal of
SpringMVC 3.0 in the future
• More engaging User experiences drive
adoption (91 countries, 6000+ institutions )
3. Spring MVC 2.5
key concepts
• The importance of annotations
– @Controller (no more inheriting from
SimpleFormController, MultiActionController on
2.0 version)
– @ModelAttribute
– @SessionAttribute
4. General Architecture (Controller)
• @Controller
• @RequestMapping(value="/profile.form")
• @SessionAttributes("spring25UserVO")
• public class ProfileForm {
• ……
• ……
• }
5. General Architecture …(1)
• @RequestMapping(method =
RequestMethod.GET)
• public String setupForm(HttpServletRequest
request, HttpServletResponse response,
Model model) {
• …….
• }
6. General Architecture….(2)
• @RequestMapping(method =
RequestMethod.POST)
• public String processSubmit(HttpServletRequest
request, @ModelAttribute("spring25UserVO")
Spring25UserVO spring25UserVO,
• BindingResult result, SessionStatus status, Model
model) {
• ….
• }
15. Profile View/JSP
• <spring:message code="bb.userProfile.gender" var="gender">
</spring:message>
• <bbNG:dataElement label="${gender}" isRequired="false">
• <!-- the "path" element (gender) points to the
userVO.user.gender property
• so as long as the userVO.user.gender reflects the value from the
• DB (User.gender) such as "MALE"...this will be automatically
• "selected" as well -->
• <form:select path="userVO.user.gender" items="${genders}"/>
• </bbNG:dataElement>