I have a user registration jsp page that asks the user to enter his personal information in text boxes and also upload his photo.
I have placed the personal information section in one form and the photo upload section in another form.
I am trying to submit the first form to Controller1 and the second form (which is multipart/form-data) to Controller2.
After setting the personal information in the entity bean in Controller1, I want to pass this object to Controller2 so that the photo (in bytes) can also be set in the entity bean.
Also, in Controller2 I have to submit the object into the database.
The challenge that I am facing is:
1) When I try to pass the entity bean object from Controller1 to Controller2, the showForm method of Controller2 is not getting called.
In Controller1, I forward the entity bean object using the following line of code:
return new ModelAndView("forward:photouploader.html","mydata",bd);