I want to create a simple handler that performs a single task and then prints the word “Done” to the screen.
Do I need to create a View template or is there an easy way to print text to the screen without writing a template?
@RequestMapping(value = "/simple_handler", method = RequestMethod.GET)
public void simpleHandler(HttpServletRequest request, ModelMap model){
this.carryOutSomeTask();
// Print "Done" on the screen
}
See http://static.springsource.org/spring/docs/3.0.x/reference/mvc.html#mvc-ann-responsebody
You just have to use