When should I use @RequestMapping instead of @RenderMapping and vice versa ?
For example what is the difference between the following where one method uses @RequestMapping and the other uses @RenderMapping
@Controller
@RequestMapping("VIEW")
public click myController {
@RequestMapping("VIEW")
public String showView(final ModelMap argMap, final RenderRequest argRequest) {
return "myView"
}
}
and :
@Controller
@RequestMapping("VIEW")
public click myController {
@RenderMapping("VIEW")
public String showView(final ModelMap argMap, final RenderRequest argRequest) {
return "myView"
}
}
@RenderMapping is a method level annotation which is used to map render requests to render methods of handler class.
The @RequestMapping annotation maps portlet requests to appropriate handlers and handler methods.
Please check this for more details
http://books.dzone.com/articles/spring-30-portlet-mvc-part-2
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With