I’m using Spring MVC, and I was wondering if it’s possible to use methods of an object added to the model in the view (JSP).I was trying to do so with this code:
<form id="formDetail" action="${detailForm.generateURLDetail()}" ...
The object is accessible in the view (I can use its attributes), but I’m not allowed to use methods. I haven’t seen nothing in Spring docs
Either use getter notation, or create a custom function (required if the method takes parameters).
Or, since you already know you need it, execute the function in the controller and expose the resulting value in the model–there’s no need to call it in the JSP itself.