Return-Path: Delivered-To: apmail-jakarta-taglibs-user-archive@jakarta.apache.org Received: (qmail 51236 invoked by uid 500); 27 Jun 2001 21:06:01 -0000 Mailing-List: contact taglibs-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk Reply-To: taglibs-user@jakarta.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list taglibs-user@jakarta.apache.org Delivered-To: moderator for taglibs-user@jakarta.apache.org Received: (qmail 35820 invoked by uid 1235); 27 Jun 2001 20:53:44 -0000 Date: Wed, 27 Jun 2001 13:53:43 -0700 (PDT) From: Morgan Delagrange X-Sender: morgand@localhost To: taglibs-user@jakarta.apache.org Subject: Re: Rowcount from DBtags in the pageContext - How(?) In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Rating: localhost 1.6.2 0/1000/N You could assign the row count to a variable using a tag library, e.g. the Page taglib. That's the easiest way to capture output from the page. On Tue, 26 Jun 2001 Damicabi@aol.com wrote: > Hi people > > I'm using the DBtags and the utility tag libraries, and what I want to > achieve is printing the result of > a query in a textfield, retrieve the number of rows in the resultset, and use > it in the JSP page context > Can I do that using these tag libraries? > > To be concrete > > > > select surname, name, age from account > order by 1 > > > > VALUE="" > VALUE="" > [no description] > > > > > > begin="<%=%>" > > > > > > > > > Of course the line > > begin="<%=%>" > > > > does not work. I should retrieve a variable from the page context > <% int totalRows = ; %> > > but that does not work. There should be a TEI class in the tag library which > gives me the number of rows. > I see the dbtags puts the resultSet and the statement in the page Context, > but there is not a way, as far as I see, > to retrieve the number of the current row from these, for instance through > > <% int totalRows = rset1.getRowCount(); %> > > As far as I can see, the ResultSetTag increments his rowCount while > retrieving the data. > > Can you help me achieve what I want? > > Greetings > Diego > >