日期:2014-05-20 浏览次数:20731 次
ResultSet fl = st.executeQuery("select * from tbl_category"); List list = new ArrayList(); while(fl.next()){ list.add(fl.getString("cname")); } request.setAttribute("fllist", list); request.getRequestDispatcher("five4.jsp").forward(request, response);
<logic:present name="fllist"> //迭代循环 <logic:iterate id="fllist" name="fllist"> <tr> <td align="center"><bean:write name="fllist" property="userName" /></td> </tr> </logic:iterate> </logic:present>
------解决方案--------------------
其实很简单:
List list= (List) request.getAttribute("fllist");