You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by "Agrawal, Anuj (Anuj)** CTR **" <ag...@lucent.com> on 2002/03/12 03:09:36 UTC
RE: can output of dbtags query be used to fill javabean propertie
s ?
> Subject: Re: can output of dbtags query be used to fill javabean
> properties ?
This is a similar question i had wanted to ask.
> Once again you can use the sql tags available in the Standard
> You can populate a bean like this:
> <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>
This violates one of the core suggestions made by the documentation (and
Shawn) - we should try not to mix scriptlets with the JSTL tags. I'd like
to stick to that "rule". So the question is - how do we achieve the above
without using scriptlets?
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>