userDao ud=new userDao();
List<userEntity> ue=ud.getAllUserInfo();
HttpSession session=req.getSession();
session.setAttribute("user", ue);
req.getRequestDispatcher("user.jsp").forward(req, resp);我要在JSP页面中怎么样才能获得我传过来的session对象????
另外一个问题如题。。在线等答案,~~~~(>_<)~~~~
List<userEntity> ue=ud.getAllUserInfo();
HttpSession session=req.getSession();
session.setAttribute("user", ue);
req.getRequestDispatcher("user.jsp").forward(req, resp);我要在JSP页面中怎么样才能获得我传过来的session对象????
另外一个问题如题。。在线等答案,~~~~(>_<)~~~~
能写得再具体点嘛??
一般要用foreach遍历出来user的所有属性,这个你肯定会吧。祝工作顺利。
<tr><td align="center"><input type="checkbox" id="sel" name="sel" value="${bm.id}"></td>
<td align="center"><img src="<%=basePath %>images/bg_users.gif"></td>
<td align="center"><img src="<%=basePath %>images/t_5.gif"><img src="<%=basePath %>images/t_5.gif">
<img src="<%=basePath %>images/t_5.gif"></td>
<td align="center"><c:out value="${bm.nickname}"></c:out></td>
<td align="center"><c:out value="${bm.others}"></c:out></td>
<td align="center"><a href="ListAllUserServlet?who=${bm.others}"><img src="<%=basePath%>images/xie.jpg"></a></td>
<td align="center"><a href="main.files/updUser.jsp?zt=${bm.others}"><img src="<%=basePath %>images/xg.gif" style="cursor:hand"></a></td>
<td align="center"><a href="delUserServlet?zw=${bm.others}"><img src="<%=basePath %>images/sc.gif" style="cursor:hand"></a></td>
</tr>
</c:forEach>