Hello everybody, I need some help with this issue: I would like to get an object from a jsp page on my MultiActionController's method.
I do have a list of object Pessoa on my jsp page, and for each one object I provide action's hyperlinks to the MultiActionController's method, just like the code below. So, when the user gets these links it should be forward to the respective method with its pessoa object fullfiled. But what I'm getting now is just a null pessoa object.
When you said MultiActionController I thought you were extending that class in the Spring Framework (which you should not be doing anymore since version 2.5) It seems you are using the controller correctly but I would get out of the habit of calling it a MultiActionController as it is a bit misleading
Anyway your model object will be null because because your not binding it. Use the Spring form tag to create a form and bind your model object to it. Also there is no need to pass in the request and response as it appears you are not using them. Also you can just return String instead of ModelAndView where String is the view name. The ModelAttribute you pass in as a parameter will automatically be included. You are not using the "msg"
First of all I would like to thank you for the reply.
But even if I would want to follow with this strategy is there any way for me to do it so? I mean, this example is a type of POC and I do not intend to keep writing codes using these controller. It is just for studying purpose.
By the way, the sample code I put in here it is not the original one, for this reason it is not showing the use of the pessoa and the msg objects.