spring form example
Example: path in spring form
<form:form method="post" modelAttribute="theStudent">
Name: <form:input type="text" path="name"/>
Cool?: <form:input type"checkbox" path="cool"/>
<button>Save</button>
</form:form>
@RequestMapping(...)
public String updateStudent(@ModelAttribute("theStudent") Student student) {
}
public class Student {
private String name;
public String getName() { return this.name; }
public void setName(String name) { this.name = name; }
private boolean cool;
public boolean isCool() { return this.cool; }
public void setCool(boolean cool) { this.cool = cool; }
}