spring mvc form tag
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
this is used to activate the spring form mvc tags
and this line should be in the top of the jsp file where you use the form operations
spring mvc form tag
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
this is used to activate the spring form mvc tags
and this line should be in the top of the jsp file where you use the form operations
path in spring form
// The path attribute is bound into java properties using java beans convention.
// For example for following 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>
// And following controller handler method:
@RequestMapping(...)
public String updateStudent(@ModelAttribute("theStudent") Student student) {
// ...
}
// Will bind automatically if the Student class is defined with following properties:
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; }
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us