Spring Framework Reference Documentation
4.3.5.RELEASE Spring Framework xviii
Handling a file upload request from programmatic clients .................................. 533
22.11. Handling exceptions ..................................................................................... 534
HandlerExceptionResolver .............................................................................. 534
@ExceptionHandler ........................................................................................ 534
Handling Standard Spring MVC Exceptions ...................................................... 535
Annotating Business Exceptions With @ResponseStatus .................................. 536
Customizing the Default Servlet Container Error Page ...................................... 536
22.12. Web Security ............................................................................................... 537
22.13. Convention over configuration support ........................................................... 537
The Controller ControllerClassNameHandlerMapping ........................................ 537
The Model ModelMap (ModelAndView) ............................................................ 538
The View - RequestToViewNameTranslator ..................................................... 539
22.14. HTTP caching support .................................................................................. 540
Cache-Control HTTP header ........................................................................... 541
HTTP caching support for static resources ....................................................... 541
Support for the Cache-Control, ETag and Last-Modified response headers in
Controllers ...................................................................................................... 542
Shallow ETag support ..................................................................................... 543
22.15. Code-based Servlet container initialization ..................................................... 544
22.16. Configuring Spring MVC ............................................................................... 545
Enabling the MVC Java Config or the MVC XML Namespace ............................ 546
Customizing the Provided Configuration ........................................................... 547
Conversion and Formatting ............................................................................. 548
Validation ....................................................................................................... 549
Interceptors .................................................................................................... 550
Content Negotiation ........................................................................................ 551
View Controllers ............................................................................................. 552
View Resolvers .............................................................................................. 552
Serving of Resources ..................................................................................... 553
Falling Back On the "Default" Servlet To Serve Resources ................................ 556
Path Matching ................................................................................................ 557
Message Converters ....................................................................................... 558
Advanced Customizations with MVC Java Config ............................................. 559
Advanced Customizations with the MVC Namespace ........................................ 560
23. View technologies ..................................................................................................... 561
23.1. Introduction .................................................................................................... 561
23.2. Thymeleaf ..................................................................................................... 561
23.3. Groovy Markup Templates .............................................................................. 561
Configuration .................................................................................................. 561
Example ......................................................................................................... 562
23.4. Velocity & FreeMarker .................................................................................... 562
Dependencies ................................................................................................ 562
Context configuration ...................................................................................... 562
Creating templates ......................................................................................... 563
Advanced configuration ................................................................................... 563
velocity.properties ................................................................................... 563
FreeMarker ............................................................................................. 564
Bind support and form handling ....................................................................... 564
The bind macros .................................................................................... 564
Simple binding ........................................................................................ 565