客户类:
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" />
如果我的路径=“cName”
<form:input mandatory="true" id="CustNameTxt" path="cName"
cssClass="txtfield controlWidth" readonly="false" />
然后我将如何在spring
控制器:
@RequestMapping(value = "/addCustomer.do", method = RequestMethod.POST)
public ModelAndView addCustomer(@ModelAttribute("customer") Customer customer1,
HttpServletRequest request, HttpSession session)