On Tue, 12 Mar 2002, Soefara Redzuan wrote: > Thank you so much Justyna. I can understand it but in a paralell topic > about JSTL it is said that the reason for using tags is to make it easier > for web page designers. However I don't know any designers who would not be > intimidated by this code. It looks like tags are still putting a lot of code > into the page. > > > <c:forEach var="row" items="${resultSet.rowsByIndex}"> > > <jsp:useBean id="mybean" class="mybean" scope="request"/> > > <jsp:setProperty name="mybean" property="nameId" > >value="<%=row[0]%>"/> > > <jsp:setProperty name="mybean" property="name" > >value="<%=row[1]%>"/> > > </c:forEach> > > Thank you again, Soefara.
Good point. I think the extra code comes, by and large, because of the need to integrate ths JSTL tags into an older way of doing business. If you just wanted to print the results, or save them to scoped variables (instead of bean properties), the code would end up being much simpler. The current draft of JSTL doesn't provide any way to set JavaBean properties. We're considering whether or not such a mechanism would be appropriate. One thought is that with JSP 1.3, which will likely support an expression language based on JSTL's, will handle this simply by allowing expressions (versus rtexprvalues) in the 'property' attribute for tags like <jsp:setProperty>. But we may need to address the need in JSTL before then. -- Shawn Bayern Author, "JSP Standard Tag Library" http://www.jstlbook.com (coming this spring from Manning Publications) -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>