java - mapping data member with diffrent name in @ModelAttribute -
customer class:
public class customer { private string custname; private string custfirstname; private string custmiddlename; private string custlastname; }
jsp:
<form:input mandatory="true" id="custnametxt" path="custname" cssclass="txtfield controlwidth" readonly="false" />
if path="cname"
<form:input mandatory="true" id="custnametxt" path="cname" cssclass="txtfield controlwidth" readonly="false" />
then how i'll map cname parameter customer class object in spring
controller:
@requestmapping(value = "/addcustomer.do", method = requestmethod.post) public modelandview addcustomer(@modelattribute("customer") customer customer1, httpservletrequest request, httpsession session)
Comments
Post a Comment