you have to import spring form taglib inorder to use elemnets of spring form like:
add this in top of your jsp
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %>
then, you can use like:
<form:form id="myForm" method="post" action="/someAction" modelAttribute="formBean">
<form:label path="name"/>
<form:input path="name"/>
<form:form>
and you have add modelAttribute/command object in controller like:
@RequestMapping(value="/someUrl", method=RequestMethod.GET)
public String showForm(Model model){
model.addAttribute("formBean", new FormBean());
return "someViewName";
}
and FormBean
class looks like:
public class FormBean {
private String name;
public FormBean(){} //default constructor
//getter and setter for name
}