From: "Dewitte Rémi" <[EMAIL PROTECTED]> > I'm quite new in struts and i'd like to print all properties of my form with > their corresponding value. I don't manage to do this with iterate. Could you > please suggest me a solution ? > my bean name is QuestionnaireForm defined in struts-config: > <form-bean name="QuestionnaireForm" > type="org.apache.struts.validator.DynaValidatorForm">
Do you just want to see what's in the form, for debugging purposes? If so, you don't have to iterate, just do: <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> <c:out value="${QuestionnaireForm}" /> (or <bean:write name="QuestionnaireForm" /> ) This just calls the 'toString' method on the form. In this case, DynaValidatorForm prints out its internal Map. If you do need to iterate over the form contents, ask the form for its Map, then print out the key and value of each MapEntry: <c:forEach items="${contactForm.map}" var="item" > <c:out value="${item.key}" /> - <c:out value="${item.value}" /><br/> </c:forEach> If you need help translating to <logic:iterate>, let us know. (Also, you might want to make your form name start with a lower-case letter. Otherwise it looks like a class name instead of an instance.) -- Wendy Smoak --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]