[英]Spring mvc controller return Collection(set, list), jsp use it as array
[英]How to return list reults to current jsp in spring MVC by controller
@RequestMapping(value="/doSearch", method = RequestMethod.POST)
public ModelAndView listSerchClients(@RequestParam("bnCustomerName") String searchText) {
Map<String, Object> model = new HashMap<String, Object>();
model.put("sclients", prepareListofBean(clientService.listSearchClientss(searchText))) ;
return new ModelAndView("serchResult", model);
}
当前,Searchresults返回到serchResult.jsp
但我想将serchResult.jsp
结果保留在当前的jsp(search.jsp)中,如何实现此目的
目前,Searchresults返回到
serchResult.jsp
但是我想将serch结果保留在当前的jsp(search.jsp
)中,如何实现这一点。
这是因为您在方法中返回了serchResult.jsp
。 只需更改返回的ModelAndView
进行search
return new ModelAndView("search", model);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.