![](https://csdnimg.cn/release/download_crawler_static/13747896/bg12.jpg)
Spring Framework Reference Documentation
4.1.9.RELEASE Spring Framework xviii
18.8. Feed Views ................................................................................................... 542
18.9. XML Marshalling View .................................................................................... 542
18.10. JSON Mapping View .................................................................................... 543
18.11. XML Mapping View ...................................................................................... 543
19. Integrating with other web frameworks ....................................................................... 544
19.1. Introduction .................................................................................................... 544
19.2. Common configuration ................................................................................... 545
19.3. JavaServer Faces 1.2 .................................................................................... 546
SpringBeanFacesELResolver (JSF 1.2+) ......................................................... 546
FacesContextUtils ........................................................................................... 546
19.4. Apache Struts 2.x .......................................................................................... 546
19.5. Tapestry 5.x .................................................................................................. 547
19.6. Further Resources ......................................................................................... 547
20. Portlet MVC Framework ............................................................................................ 548
20.1. Introduction .................................................................................................... 548
Controllers - The C in MVC ............................................................................ 549
Views - The V in MVC .................................................................................... 549
Web-scoped beans ......................................................................................... 549
20.2. The DispatcherPortlet ..................................................................................... 549
20.3. The ViewRendererServlet ............................................................................... 551
20.4. Controllers ..................................................................................................... 552
AbstractController and PortletContentGenerator ............................................... 553
Other simple controllers .................................................................................. 554
Command Controllers ..................................................................................... 554
PortletWrappingController ................................................................................ 555
20.5. Handler mappings .......................................................................................... 555
PortletModeHandlerMapping ............................................................................ 556
ParameterHandlerMapping .............................................................................. 556
PortletModeParameterHandlerMapping ............................................................ 557
Adding HandlerInterceptors ............................................................................. 557
HandlerInterceptorAdapter ............................................................................... 558
ParameterMappingInterceptor .......................................................................... 558
20.6. Views and resolving them .............................................................................. 558
20.7. Multipart (file upload) support ......................................................................... 558
Using the PortletMultipartResolver ................................................................... 559
Handling a file upload in a form ...................................................................... 559
20.8. Handling exceptions ....................................................................................... 563
20.9. Annotation-based controller configuration ........................................................ 563
Setting up the dispatcher for annotation support ............................................... 563
Defining a controller with @Controller .............................................................. 564
Mapping requests with @RequestMapping ....................................................... 564
Supported handler method arguments ............................................................. 566
Binding request parameters to method parameters with @RequestParam .......... 568
Providing a link to data from the model with @ModelAttribute ............................ 568
Specifying attributes to store in a Session with @SessionAttributes .................... 569
Customizing WebDataBinder initialization ......................................................... 569
Customizing data binding with @InitBinder ............................................... 569
Configuring a custom WebBindingInitializer .............................................. 570
20.10. Portlet application deployment ...................................................................... 570
21. WebSocket Support .................................................................................................. 571