Thanks Shawn,

That is apparently not it.  I now get a null pointer exception in the call
to doStartTag().  There is a call just above that ".setParent(null)" so that
may be an indication that my configuration is not quite right.  The last
call recorded in my log is 'getConnection()' so that seems to be completing
(the exceptions are not logged).  I was hoping that there was a more
complete example somewhere which includes the context setup part, but I
guess I need to just keep looking.

Your book should be a valuable resource.  I am looking forward to it.

Jim.

-----Original Message-----
From: Shawn Bayern [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 01, 2002 2:07 PM
To: Tag Libraries Users List
Subject: Re: jstl sql dataSource configuration help


On Mon, 1 Apr 2002, James Hazel wrote:

> my jsp code is:
> <sql:query var="stuff" dataSource="${dataSource}"
>             >SELECT * FROM articles</sql:query>
>
> <c:out value="Query completed.  Rows returned are: " />
> <c:out value="$stuff.getSize()" />
>
> I configured the dataSource as a class implementing the
javax.sql.DataSource
> interface and use it in other places to create the database, but the above
> query always returns as if the 'stuff' variable is not initialized: "Query
> completed.  Rows returned are:$stuff.getSize()"

I think you're just using the expression incorrectly.  You want to write

  <c:out value="${stuff.size}" />

instead.

--
Shawn Bayern
Author, "JSP Standard Tag Library"  http://www.jstlbook.com
(coming this summer from Manning Publications)


--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to