没有合适的资源?快使用搜索试试~ 我知道了~
struts常见错误以及解决
需积分: 10 11 下载量 124 浏览量
2008-10-29
11:17:25
上传
评论
收藏 2KB TXT 举报
温馨提示
struts标签使用常见错误原因很多,这里积累了我遇见的几种错误及相应的解决方法。 同志们多注意积累——能让我们直接找到问题的原因所在,直接修改,提高开发效率,提升自我价值!
资源推荐
资源详情
资源评论
![z01](https://img-home.csdnimg.cn/images/20210720083646.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![z02](https://img-home.csdnimg.cn/images/20210720083646.png)
![application/x-rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![doc](https://img-home.csdnimg.cn/images/20210720083327.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![application/octet-stream](https://img-home.csdnimg.cn/images/20210720083646.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
.1.错误分析:Servlet.service() for servlet jsp threw exception
javax.servlet.jsp.JspException: Cannot find bean: "list" in any scope
错误原因:循环中只定义了Auditlist,而其中误调用了list,导致list没有被定义而被使用的错误,这里应把list改为
Auditlist,方正确。
<logic:iterate id="Auditlist" name="AuditList">
<bean:define id="status" name="Auditlist" property="status"/>
<tr>
<td align="center" class="bgfill"> <bean:write name="Auditlist" property="platname"/></td>
<td align="center" class="bgfill"><bean:write name="list" property="salesname"/></td>
<td align="center" class="bgfill"><bean:write name="list" property="buddyname"/></td>
<td align="center" class="bgfill">
</td>
<td height="28" align="center" class="bgfill">
<%=com.thunis.ca.util.SystemConstants.getStatus((String)status)%>
</td>
<td height="28" align="center" class="bgfill"><bean:write name="Auditlist" property="field1"/></td>
<td height="28" align="center" class="bgfill">
<a href="<%=request.getContextPath()%>/jsp/workflow/ChannelRebat.do?actionType=view&oid=<bean:write name="Auditlist" property="oid"/>"><bean:write name="Auditlist" property="oid"/></a>
</td>
</tr>
</logic:iterate>
也可能有其它原因:
(1)、在Action里一般会request.setAttribute()一些对象,然后在转向的jsp文件里(用tag或request.getAttribute()方法)得到这些对象并显示出来。这个异常是说jsp要得到一个对象,但前面的Action里并没有将对象设置到request(也可以是session、servletContext)里。
(2)、可能是名字错了,请检查jsp里的tag的一般是name属性,或getAttribute()方法的参数值;或者是Action逻辑有问题没有执行setAttribute()方法就先转向了。
(3)、还有另外一个可能,纯粹是jsp文件的问题,例如会指定一个id值,然后在循环里使用这个值作为name的值,如果这两个值不同,也会出现此异常。(都是一个道理,request里没有对应的对象。)
javax.servlet.jsp.JspException: Cannot find bean: "list" in any scope
错误原因:循环中只定义了Auditlist,而其中误调用了list,导致list没有被定义而被使用的错误,这里应把list改为
Auditlist,方正确。
<logic:iterate id="Auditlist" name="AuditList">
<bean:define id="status" name="Auditlist" property="status"/>
<tr>
<td align="center" class="bgfill"> <bean:write name="Auditlist" property="platname"/></td>
<td align="center" class="bgfill"><bean:write name="list" property="salesname"/></td>
<td align="center" class="bgfill"><bean:write name="list" property="buddyname"/></td>
<td align="center" class="bgfill">
</td>
<td height="28" align="center" class="bgfill">
<%=com.thunis.ca.util.SystemConstants.getStatus((String)status)%>
</td>
<td height="28" align="center" class="bgfill"><bean:write name="Auditlist" property="field1"/></td>
<td height="28" align="center" class="bgfill">
<a href="<%=request.getContextPath()%>/jsp/workflow/ChannelRebat.do?actionType=view&oid=<bean:write name="Auditlist" property="oid"/>"><bean:write name="Auditlist" property="oid"/></a>
</td>
</tr>
</logic:iterate>
也可能有其它原因:
(1)、在Action里一般会request.setAttribute()一些对象,然后在转向的jsp文件里(用tag或request.getAttribute()方法)得到这些对象并显示出来。这个异常是说jsp要得到一个对象,但前面的Action里并没有将对象设置到request(也可以是session、servletContext)里。
(2)、可能是名字错了,请检查jsp里的tag的一般是name属性,或getAttribute()方法的参数值;或者是Action逻辑有问题没有执行setAttribute()方法就先转向了。
(3)、还有另外一个可能,纯粹是jsp文件的问题,例如会指定一个id值,然后在循环里使用这个值作为name的值,如果这两个值不同,也会出现此异常。(都是一个道理,request里没有对应的对象。)
资源评论
![avatar-default](https://csdnimg.cn/release/downloadcmsfe/public/img/lazyLogo2.1882d7f4.png)
![avatar](https://profile-avatar.csdnimg.cn/default.jpg!1)
quningstudy
- 粉丝: 9
- 资源: 4
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助
![voice](https://csdnimg.cn/release/downloadcmsfe/public/img/voice.245cc511.png)
![center-task](https://csdnimg.cn/release/downloadcmsfe/public/img/center-task.c2eda91a.png)
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback-tip](https://img-home.csdnimg.cn/images/20220527035111.png)
安全验证
文档复制为VIP权益,开通VIP直接复制
![dialog-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/green-success.6a4acb44.png)