Hi. 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> </td> <td class="content" align="left"> <c:out value="${actual.password}"/><br> </td> </tr> </c:forEach> </table> where clientCollection is a collection from the form bean... >From the LoginAction, I am calling a method in businessBean which returns a arraylist >that I had already set it in the formBean collection... My LoginAction is something like this... public class LoginAction extends Action { BusinessBean businessBean = null; String name = null; String password = null; public RegisterResourcesAction() { super(); } public ActionForward execute( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { ActionErrors errors = new ActionErrors(); ActionForward forward = new ActionForward(); LoginForm loginForm = (LoginForm) form; HttpSession session = request.getSession(false); name = loginForm.getClient().getName(); password = loginForm.getClient().getPassword(); businessBean = new BusinessBean(); ArrayList aList = firstBean.exeQuery(name, password); loginForm.setClientCollection(aList); forward = mapping.findForward("success"); return (forward); } }
If anybody out there could help, it would be great... Thanks in advance... -Jacob --------------------------------- Do you Yahoo!? The New Yahoo! Shopping - with improved product search