I've a spring web application. I'm passing a parameter from controllerA
to jsp1.jsp
page. This page after 5sec will redirect to jsp2.jsp
. During the redirect the request goes through controllerA
. I would like to know how do I pass the parameter from jsp1.jsp to controllerA.
here is my controllerA
method
@RequestMapping(value="/jsp2", method = RequestMethod.GET)
public String jsp2(ModelMap model) {
// code to access the parameter from jsp1.jsp
return "/pages/jsp2";
}
Depends on how you are passing the parameter. If you are passing it as a query parameter, you can access it like below