Problem Statement: I have to show data from two independent models on the JSP.
Say for example There are two models: account and Student.
Attributes of Student Model are editable so, I can make use of modelattribute in the spring form and map the data from jsp to my java object.
Attributes of account are readable only, but as I have already mentioned student model in the modelattribute , in the jsp form and there can only be one modelattribute per jsp form, so I cannot assign the account to the modelattribute in Jsp spring form. In that case, how the data of the account model will be shown in the Jsp.
Secondly, writing: public String requestHandlingMethod(@ModelAttribute Student student, @ModelAttribute Student student)
Is this valid or not, i.e having two @ModelAttribute in Spring handler method