I would like to share my problem with you.
I built on jsp page and use on my page some of
it use
to
I believe you should use <form:select>
inside the <form:form>
.
It should look like this:
search.jsp:
<form:form modelAttribute="myform" action="result" method="get" >
<form:select path="nameOfInstitution">
<form:option value="NONE"> --SELECT--</form:option>
<form:options items="${listOfInstitutionsNames}"></form:options>
</form:select>
...
</form:form>
HomeController.java:
@RequestMapping(value = "/search", method = RequestMethod.GET)
public String search(Model model) {
...
model.addAttribute("myform", new MyForm());
return "search";
}
@RequestMapping(value = "/result", method = RequestMethod.GET)
public String SecondActionPage(@RequestParam String nameOfInstitution,
Model model,
@ModelAttribute("myform") MyForm myform)
throws Exception {
...
}
MyForm.java:
public class MyForm {
private String nameOfInstitution;
public String getNameOfInstitution() {
return nameOfInstitution;
}
public void setNameOfInstitution(String nameOfInstitution) {
this.nameOfInstitution = nameOfInstitution;
}
}
Hope this helps.