在线求救:javax.servlet.jsp.JspException: Cannot find bean flist in scope request

yal_1224 2008-10-10 05:55:27
我现在用struts的标签输出信息,但老是报javax.servlet.jsp.JspException: Cannot find bean flist in scope request错误,源代码如下:
<form method="POST" action="<%=root%>/WriteFiles.do?action=listfile" >
<table border="1" cellpadding="0" cellspacing="0" width="100%" id="table8" style="font-size: 9pt; border-collapse:collapse; padding-left:10px; padding-right:10px; padding-top:5px; padding-bottom:5px" bordercolor="#7B8986">

<tr style="background-color: #DAE3E4">
<td height="20" nowrap>文号</td>
<td height="20" nowrap>类型</td>
<td nowrap width="100%">标题</td>
<td nowrap>日期</td>
<td nowrap>部门</td>
<td nowrap colspan="3">操作</td>
</tr>
<logic:iterate id="filelist" name="flist" type="cn.jxust.graduated.sys.model.WriteFile" scope="request">
<tr>
<td width="10%"><bean:write name="filelist" property="fileno"/></td>
<td width="10%"><bean:define id="filetype" name="filelist" property="filetype"/>
<%
if("doc".equals(filetype) && filetype!=null){%>
<img src="../icon/word.jpg" width="20" height="20">
<%}
else if ("pdf".equals(filetype) && filetype!=null){%>
<img src="../icon/pdf.gif" width="20" height="20">
<%}
else if("txt".equals(filetype) && filetype!=null) {%>
<img src="../icon/jsb.gif" width="20" height="20">
<%}
else if(("html".equals(filetype) || "htm".equals(filetype)) && filetype!=null) {%>
<img src=" ../icon/ie.gif" width="20" height="20">
<%}
else{%>
<img src="<%=root%>/icon/ico2.gif">
<%}%>
<a href="<%=root%>/fileManage.do?action=viewOrdownTitleBlob&fileid=<bean:write name='filelist' property='fileid'/>&isdown='online'" target="_blank">
<bean:write name="filelist" property="filename"/></a></td>
<td width=15% ><a href="<%=root%>/fileManage.do?action=viewTitleClob&fileid=<bean:write name='filelist' property='fileid'/>" target="_blank"><bean:write name="filelist" property="filetitle"/></a></td>
<td width="15%"><bean:write name="filelist" property="issue_date"/></td>
< <td width=5%><b><a href="<%=root%>/fileManage.do?action=editTFile&fileid=<bean:write name='filelist' property='fileid'/>">编辑</a></b></td>
<td width=5%><b><a href="<%=root%>/WriteFiles.do?action=viewOrdownTitleBlob&fileid=<bean:write name='filelist' property='fileid'/>&isdown='down'" target="_blank">下载</a></b></td>

<td width=5%><b><a href="#" onclick="ConfirmOperate('是否删除选择标题是:'+'<bean:write name='filelist' property='title'/>'+'的文件记录!','<%=root%>/WriteFiles.do?action=deleteTFile&id=<bean:write name='filelist' property='fileid'/>')">删除</a></b></td>
</tr>

</logic:iterate>

</table>
</form>
其中:action中的代码如下:
if(action.equalsIgnoreCase("listfile")){

List flist= FileManage.getFiles();
if(flist.isEmpty()){
errors.add(ActionMessages.GLOBAL_MESSAGE,
new ActionMessage("errors.loginFail"));
if (!errors.isEmpty()) {
saveErrors(request, errors);
}
return mapping.findForward("toFail");
}
else{
request.setAttribute("flist", flist);
flist=null;
return mapping.findForward("listfile");
}

}
...全文
407 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
luceas 2011-08-17
  • 打赏
  • 举报
回复
什么情况????????
yal_1224 2008-10-11
  • 打赏
  • 举报
回复
问题解决了,CSDN每次问的问题都没有什么人回答,比较令人失望哟!
zhj92lxs 2008-10-10
  • 打赏
  • 举报
回复
flist=null; 为什么
lihan6415151528 2008-10-10
  • 打赏
  • 举报
回复
帮顶!

67,537

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧