After going thru some source codes in the struts package, i discovered that the problem hat to do with formating, the last two colums of my table are DATE formats which translated to java.sql.date type in java. the bean taglib was looking for a resource ot determine how to format the data on those fields but since i did not create any resource configurations, it was looking for what was not there. i had to hard code a format on the bean:write tag using the format attribute. i dont think this is a neat idea especially for beginers like me who want to whip up a working application with as little advanced configurations as possible so we can learn one thing at a time, (resource bundles/intenationalizatin, jdbc, etc) and still get struts to give us some workable defaults.
----- Original Message ----- From: "Olasoji Ajayi" <[EMAIL PROTECTED]>
To: "struts user mailing list" <user@struts.apache.org>
Sent: Tuesday, January 04, 2005 9:18 AM
Subject: error with logic:iterate on dynabeans



i get the following error when i run a web application to display the contents of a table.




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.formFile_jsp._jspService(formFile_jsp.java:238) 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.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:305) org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1056) org.apache.struts.action.RequestProcessor.internalModuleRelativeForward(RequestProcessor.java:994) org.apache.struts.action.RequestProcessor.processForward(RequestProcessor.java:553) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:211) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1158) org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415) javax.servlet.http.HttpServlet.service(HttpServlet.java:763) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:305) 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:1158) org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415) javax.servlet.http.HttpServlet.service(HttpServlet.java:763) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:305)root causejavax.servlet.jsp.JspException: Cannot find message resources under keyorg.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:362) org.apache.struts.taglib.bean.WriteTag.doStartTag(WriteTag.java:234) org.apache.jsp.formFile_jsp._jspService(formFile_jsp.java:195) 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.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:305) org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1056) org.apache.struts.action.RequestProcessor.internalModuleRelativeForward(RequestProcessor.java:994) org.apache.struts.action.RequestProcessor.processForward(RequestProcessor.java:553) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:211) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1158) org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415) javax.servlet.http.HttpServlet.service(HttpServlet.java:763) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:305) 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:1158) org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415) javax.servlet.http.HttpServlet.service(HttpServlet.java:763) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:305)note The full stack trace of the root cause is available in the Tomcat logs.--------------------------------------------------------------------------------Apache Tomcat/5.0.19below is the code i want to use to display the content of a database table.the rowSet attribute is a RowSetDynaClass containing the result of thequery.<bean:define id="cols" name="rowSet" property="dynaProperties"/> <table border="2"> <tr> <logic:iterate id="col" name="cols"> <th><bean:write name="col" property="name"/></th> </logic:iterate> </tr> <logic:iterate id="row" name="rowSet" property="rows"> <tr> <logic:iterate id="col" name="cols"> <td> <bean:write name="row" property="<%=((DynaProperty)col).getName() %>"/> </td> </logic:iterate> </tr> </logic:iterate> </table>when i replace the <%= ((DynaProperty)col).getName()%> with one of thevalues of the column, the program runs correctly (i.e. the entire table ispopulated with the values of the column as expected). why is it not workingand if it can't what other method can i use to dynamicaly generate theproperty value for the tag


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to