关于struts 的logic:iterate的标签

jie
04-11-26 0 170

页面代码,下面的两个判断中的循环都是正确的,可就是放在第2个就不能执行
<%
if (request.getParameter("redirect") !=null) {
%>
<%
if(request.getParameter("redirect").equals("threeModul")){
%>
<logic:iterate id="threeModul" name="threeModulList">
<bean:define name="threeModul" property="modul" id="modul"/>
location.href="threeModulContent.do?actn=modulIdfind&Id=<bean:write name="modul" property="modulId" />"
</logic:iterate>
<%
}
%>
<%
if (request.getParameter("redirect").equals("modul")) {
%>
<logic:iterate id="show" name="showList" >
<bean:define name="show" property="portal" id="portal"/>
location.href="Modul.do?actn=list&portalId=<bean:write name="portal" property="portalId" />"
</logic:iterate>
<%}%>
<%
}
%>

页面报错:
class java.lang.NullPointerException:null

0._publish_22dadmin._modulmanage._uploadsuccess__jsp._jspService() (_uploadsuccess__jsp.java:line=119)
1.com.caucho.jsp.JavaPage.service() (JavaPage.java:line=75)
2.com.caucho.jsp.Page.subservice() (Page.java:line=506)
3.com.caucho.server.http.FilterChainPage.doFilter() (FilterChainPage.java:line=182)
4.com.caucho.server.http.Invocation.service() (Invocation.java:line=315)

找到页面生成的java文件中的119行是:
_jsp_tag0.setId("show");

好象是说不能定义,我把id的变量名改成别的也没有用,谁知道这是怎么回事啊