I am tryying to implement a very simple Spring MVC application however not interested in binding a bean or model as I simply want to transfer value from one view to another through the controller.
Consider the following:
I have a simple searchForm
<form id="searchForm" name="searchForm" method="POST">
<input name="test" name="test"/>
<input type="submit" value="Submit"/>
</form>
I then have a method in the controller which intercepts the post request:
@RequestMapping(method = RequestMethod.POST)
public ModelAndView processSubmit(ModelMap model, HttpServletRequest httpRequest)
{
return new ModelAndView("Results", model);
}
I now want to read the value submitted in the "test" input so in Results view I have:
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<body>
<c:out value="${test}"/>
</body>
But I don't see the value submitted.