jsp中使用valuelist

项目中的程序片断,大家根据自己的情况自己灵活运用,这里只是抛个砖。。。

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
 ApplicationContext applicationContext = WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
 ResourceService resourceService = (ResourceService) applicationContext.getBean("resourceService");
 
 Map params = ValueListRequestUtil.getRequestParameterMap(request);   
 String topicId=null;
 if(request.getParameter("topicId")!=null){
  topicId = request.getParameter("topicId");
 }
 ValueList list = resourceService.searchByValueList(Long.valueOf(topicId),params); 
 request.setAttribute("list", list);
%>

你可能感兴趣的:(jsp)