> -----Original Message----- > From: Jacob Wilson [mailto:[EMAIL PROTECTED] > > I am developing a new application in Struts and just wanted > to see how to implement JSTL in my jsps... I am trying to > iterate a loop using a jstl tag... I am specifying a > collection object in the items attribute of the iterator > action. I get this following error... > > org.apache.jasper.JasperException: An error occurred while > evaluating custom action attribute "value" with value > "${actual.name}": Unable to find a value for "name" in object > of class "java.lang.String" using operator "." (null) > > My jsp goes something like this... > > <table align="center" border="0" cellspacing="1" > cellpadding="1" width="748"> > <tr bgcolor="#999999"> > <th bgcolor="#cccccc" class="blueLink" align="center" > width="">User Name</th> > <th bgcolor="#cccccc" class="blueLink" align="center" > width="">Password</th> > </tr> > <c:forEach var="actual" items="${loginForm.clientCollection}"> > <tr bgcolor="#9EC6FF"> > <td class="content" align="left"> > <c:out value="${actual.name}"/><br>
The collection in the "clientCollection" property has to be a collection of JavaBeans, each of which has a "name" property (and others) referenced by standard JavaBean accessors. >From your error message, I'm guessing that "clientCollection" is a collection of java.lang.String objects. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
