logic:iterate标签问题 我在JSP中使用了logic:iterate标签,一直没有数据显示出来,请大家帮我看看

<logic:emptyname="userInfoList"scope="request"><center><h3>抱歉:没有您的信息</h3></center></l... <logic:empty name="userInfoList" scope="request">
<center><h3>抱歉:没有您的信息</h3></center>
</logic:empty>
<table align="center" border="1">
<logic:notEmpty name="userInfoList" scope="request">
<logic:iterate id="student" name="userInfoList" scope="request">
<tr>
<th width="33.3%">帐号</th>
<th width="33.3%">昵称</th>
<th width="33.3%">真实姓名</th>
</tr>
<tr>
<td width="33.3%"><bean:write name="student" property="ID"/></td>
<td width="33.3%"><bean:write name="student" property="userName"/></td>
<td width="33.3%"><bean:write name="student" property="trueName"/></td>
</tr>
<tr>
<th width="33.3%">电话号码</th>
<th width="33.3%">详细地址</th>
<th width="33.3%">电子邮箱</th>
</tr>
<tr>
<td width="33.3%"><bean:write name="student" property="phone"/></td>
<td width="33.3%"><bean:write name="student" property="address"/></td>
<td width="33.3%"><bean:write name="student" property="email"/></td>
</tr>
</logic:iterate>
</logic:notEmpty>
</table>
action中方法:
public ActionForward checkUserInfo(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response){
HttpSession session=request.getSession();
String userName=(String)session.getAttribute("userName");
if(userName==null||userName.equals(""))//若用户为空
return mapping.findForward("fail");
Map map=new HashMap();
map.put("userName",userName);
UserDao dao=new UserDaoSimple();
List list=new ArrayList();
list=dao.queryArray(map);//学生查询
request.setAttribute("userInfoList", list);//将查询结果放入request中
return mapping.findForward("studentInfo");//将数据返回查询页
}
展开
 我来答
hillyct
2011-03-26 · 超过30用户采纳过TA的回答
知道答主
回答量:76
采纳率:0%
帮助的人:85.7万
展开全部
页面顶部是否有对logic标签库的引入?
比如
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>

如果还有问题,可以在action中看list是否为空。
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式