When I load a jsp view (I use struts) in which there is a forEach tag I obtain: javax.servlet.ServletException: javax.servlet.jsp.JspException: An error occurred while evaluating custom action attribute "items" with value "${v.children}": Unable to find a value for "children" in object of class "it.ph.prodotti.fe.model.PriorityFeCat" using operator "." (null) org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:821) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758) org.apache.jsp.shop.fe.myvisto.home_jsp._jspService(home_jsp.java:171) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) javax.servlet.http.HttpServlet.service(HttpServlet.java:810) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) javax.servlet.http.HttpServlet.service(HttpServlet.java:810) org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1056) org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:261) org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:388) org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:316) 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:697) javax.servlet.http.HttpServlet.service(HttpServlet.java:810) org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:75) root cause javax.servlet.jsp.JspException: An error occurred while evaluating custom action attribute "items" with value "${v.children}": Unable to find a value for "children" in object of class "it.ph.prodotti.fe.model.PriorityFeCat" using operator "." (null) org.apache.taglibs.standard.lang.jstl.Evaluator.evaluate(Evaluator.java:109) org.apache.taglibs.standard.lang.jstl.Evaluator.evaluate(Evaluator.java:129) org.apache.taglibs.standard.lang.support.ExpressionEvaluatorManager.evaluate(ExpressionEvaluatorManager.java:75) org.apache.taglibs.standard.tag.el.core.ForEachTag.evaluateExpressions(ForEachTag.java:155) org.apache.taglibs.standard.tag.el.core.ForEachTag.doStartTag(ForEachTag.java:66) org.apache.jsp.shop.fe.myvisto.home_005fmenu_005fsx_jsp._jspx_meth_c_forEach_1 (home_005fmenu_005fsx_jsp.java:195) org.apache.jsp.shop.fe.myvisto.home_005fmenu_005fsx_jsp._jspx_meth_c_forEach_0 (home_005fmenu_005fsx_jsp.java:136) org.apache.jsp.shop.fe.myvisto.home_005fmenu_005fsx_jsp._jspService(home_005fmenu_005fsx_jsp.java:74) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) javax.servlet.http.HttpServlet.service(HttpServlet.java:810) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) javax.servlet.http.HttpServlet.service(HttpServlet.java:810) org.apache.taglibs.standard.tag.common.core.ImportSupport.acquireString(ImportSupport.java:296) org.apache.taglibs.standard.tag.common.core.ImportSupport.doEndTag(ImportSupport.java:161) org.apache.jsp.shop.fe.myvisto.home_jsp._jspx_meth_c_import_1 (home_jsp.java:232) org.apache.jsp.shop.fe.myvisto.home_jsp._jspService(home_jsp.java:96) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) javax.servlet.http.HttpServlet.service(HttpServlet.java:810) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) javax.servlet.http.HttpServlet.service(HttpServlet.java:810) org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1056) org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:261) org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:388) org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:316) 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:697) javax.servlet.http.HttpServlet.service(HttpServlet.java:810) org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:75) NB: 1) If I use jvm for linux 1.4.2_07 this exception is thrown otherwise if i use JVM 1.4.2_05 ALL WORK (the same application into the same environment: jboss + linux) 2) The class it.ph.prodotti.fe.model.PriorityFeCat not directly but from an its Superclass has the attribute children 3) jstl.jar AND standard.jar are into WEB-INF/lib directory and both are version 1.0.6 (I looked into MANIFEST.MF) I solved this problem (as said in point 1) by "backversioning" my JVM I'had this idea after read this: http://forum.java.sun.com/thread.jspa?threadID=599301&tstart=0 any idea?
I recently ran into this problem and eventually figured out the root cause: not having setters in the bean being introspected by JSTL. Looking over the change log for 1.4.2_06 (http://java.sun.com/j2se/1.4.2/ReleaseNotes.html#142_06), I think this bug report: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4918902 is what lead to this change. I haven't tested this exhaustively, but for the relatively simple class we were using, under 1.4.2_06 and above Introspector.getBeanInfo(class).getPropertyDescriptors() will return null for read method unless there's a write method present as well.
Thanks for that report Bill, that makes a lot of sense. I've added this to the list of issues to FAQ. http://wiki.apache.org/jakarta-taglibs/Standard_1%2e1%2e3
FAQ'd: http://wiki.apache.org/jakarta-taglibs/Standard1%2e1%2e3FAQ Resolving as WONTFIX.