@RequestMapping(value = "/index", method = RequestMethod.GET)
public final String index(final ModelMap model)
{
List myModels = ArrayList<MyModel>(getMyModels());
model.addAttribute("mymodel", myModels);
return "index";
}
In Spring I put the
myModels
list into theModelMap
to be passed to the "index" view. How do I then access thoseMyModel
objects from the JSTL code?Is it necessary for this controller method to be
final
and for theModelMap
parameter to befinal
?