tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Bayern <bay...@essentially.net>
Subject Re: extending JSTL
Date Tue, 03 Sep 2002 02:52:14 GMT
On Mon, 2 Sep 2002, Gisella Saavedra wrote:

> I would like to extend the SQL tags by adding a tag for
> stored procedures.  Which is the recommended way about extending
> this tag library?

JSTL is a standard, and while our implementation is open-source, it can't
be brought out of compliance with the specification.  The JSTL expert
group considered support for JDBC CallableStatements but decided, at least
for JSTL 1.0, that the need wasn't yet compelling and was perhaps at odds
with the design goals for the SQL tag libraries.  If you have an opinion,
the best way to inform the expert group is to send a message to

  jsr-52-comments@jcp.org

Features can be added in future versions of JSTL.  When new versions of
the specification are released, our implementation will begin to comply
with them.

> I noticed that when there are no records returned from a query, the
> ${result.rowCount} returns NULL.  I guess this is a bug.

This seems to work for me (on the Standard Taglib 1.0.1 release):

 <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
 <%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql" %>
 <sql:update>
   create table foo (
     foo integer
   )
 </sql:update>
 <sql:query var="foo">
   select * from foo
 </sql:query>
 <c:out value="${foo.rowCount}" />
 <sql:update>
   insert into foo values(0)
 </sql:update>
 <sql:query var="foo">
   select * from foo
 </sql:query>
 <c:out value="${foo.rowCount}" />

Against my sample database, this outputs 0 followed by 1.

In what environment does the expression fail for you?  Could I see an
entire page?

-- 
Shawn Bayern
"JSTL in Action"   http://www.jstlbook.com


--
To unsubscribe, e-mail:   <mailto:taglibs-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:taglibs-user-help@jakarta.apache.org>


Mime
View raw message