使用logic:iterate遇到的问题

发表于:2007-06-22来源:作者:点击数: 标签:
logic:iterate id=agUser name=agUserOverview tr td align=left class=page a href=processuser.do?actiontype=viewaguserid=bean:write name=agUser property=userid filter=true / bean:write name=agUser property=userid filter=true //a /td td align=

   

<logic:iterate id="agUser" name="agUserOverview">
        <tr>

        <td align="left" class="page"

        <a href="processuser.do?actiontype=view&aguserid=<bean:write name="agUser" property="userid" filter="true" />">
            <bean:write name="agUser" property="userid" filter="true" /></a>
          </td>

             <td align="center" class="page"><bean:write name="agUser" property="username" filter="true" /></td>
             <td align="center" class="page"><bean:write name="agUser" property="password" filter="true" /></td>
             <td align="center" class="page">
             <logic:equal name="agUser" property="roleid" value="1">
             管理员
             </logic:equal>
             <logic:equal name="agUser" property="roleid" value="2">
             普通员工
             </logic:equal>
             </td>
          </tr>
</logic:iterate>

如果把红色那段去掉,程序就能运行,也能把数据表现出来, 但是如果留下这段,页面就会出错误:

HTTP Status 500 -


type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: Cannot find message resources under key org.apache.struts.action.MESSAGE
	org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:867)
	org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:800)
	org.apache.jsp.system.user.queryuserresult_jsp._jspService(queryuserresult_jsp.java:175)
	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
	org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1056)
	org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:388)
	org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:231)
	org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
	org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

root cause

javax.servlet.jsp.JspException: Cannot find message resources under key org.apache.struts.action.MESSAGE
	org.apache.struts.taglib.TagUtils.retrieveMessageResources(TagUtils.java:1233)
	org.apache.struts.taglib.TagUtils.message(TagUtils.java:1082)
	org.apache.struts.taglib.TagUtils.message(TagUtils.java:1057)
	org.apache.struts.taglib.bean.WriteTag.retrieveFormatString(WriteTag.java:256)
	org.apache.struts.taglib.bean.WriteTag.formatValue(WriteTag.java:319)
	org.apache.struts.taglib.bean.WriteTag.doStartTag(WriteTag.java:234)
	org.apache.jsp.system.user.queryuserresult_jsp._jspx_meth_bean_write_0(queryuserresult_jsp.java:206)
	org.apache.jsp.system.user.queryuserresult_jsp._jspService(queryuserresult_jsp.java:125)
	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
	org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1056)
	org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:388)
	org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:231)
	org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
	org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

note The full stack trace of the root cause is available in the Tomcat logs.


Apache Tomcat/5.0.19

原文转自:http://www.ltesting.net