Sunday, 8 September 2013

Get data from HttpServletRequest with spring mvc

Get data from HttpServletRequest with spring mvc

I am new to Spring MVC.
What I want to achieve is to add a map of data into HttpServletRequest;
Example:
private NewRequestService newRequest = new NewRequestService();
public ModelAndView inputRequiredInfo(@ModelAttribute("requestForm")
HttpServletRequest request) {
request.setAttribute("mylist", newRequest.loadAllUserDomainType());
return new ModelAndView("request/selectDomainUser","requestForm", request);
}
And then in the view jsp file, I want to get those data which pass into
the request and put it into dropdown list.

No comments:

Post a Comment