This tag is a shortcut for defining a ParameterizableViewController that immediately forwards to a view when invoked. Use it in static cases when there is no Java Controller logic to execute before the view generates the response.
An example of view-controller that forwards to a home page is shown below:
Source: http://static.springsource.org/spring/docs/3.0.x/reference/mvc.html
Thursday, June 23, 2011
Tuesday, June 21, 2011
Spring 3.1 M2: Spring MVC Enhancements
Programming Model Improvements
This is the list of programming model improvements introduced in the new @MVC support classes.- Declared @PathVariable arguments are now automatically added to the model. For example this:
- Redirect strings support URI templates expanded with variables from the model (including declared @PathVariables). For example this:
- URI template variables are supported in data binding. For example this:
- Consumable and producible media types can be specified via @RequestMapping. For example this:
- For producible media types this:
is replaced by:
is replaced by:
is replaced by:
is replaced by:
Besides being shorter the above returns NOT_ACCEPTABLE (406) if the URL matches but the input media type doesn't.
is replaced by:
The above returns a NOT_SUPPORTED_MEDIA_TYPE (415) if the URL matches but the acceptable media type doesn't.
Subscribe to:
Posts (Atom)