If you poke around in the mailling list for the taglib project you will find a mail or two about this,
if I remember correctly had something to do with the tag not confrming to the taglib specification that tomcat provides.



You could use jstl instead, but from my experience SQL in the jsp is more trouble then it is worth and causes imense headaches
when you want to do something complicated. Just a suggestion but it could be a good time for you to have a look at migrating to Struts or some other framework which suits your needs :D


Mickael Cappozzo wrote:

Hello,

We wanted to migrate from tomcat 4.0 to tomcat 4.1.24, but we encoutered the following problem:
When a query return nothing, the query's body is displayed on the JSP page if the page contains another query returning something.


example:
In the table Users, we don't have user with username "toto" and with have a user with username "test" if we write the following in a jsp page:


<sql:statement id="getUserTest" conn="myConn">
  <%-- THIS QUERY RETURNS THE UserID --%>
 <sql:query>
   SELECT UserID
     FROM Users
     WHERE username = 'test'
 </sql:query>
 <sql:resultSet id="getUserIDTest">
   <sql:getNumber position="1" to="userIDTest"/>
 </sql:resultSet>
</sql:statement>

<sql:statement id="getUserToto" conn="myConn">
  <%-- THIS QUERY IS EMPTY --%>
 <sql:query>
   SELECT UserID
     FROM Users
     WHERE username = 'toto'
 </sql:query>
 <sql:resultSet id="getUserIDToto">
   <sql:getNumber position="1" to="userIDToto"/>
 </sql:resultSet>
</sql:statement>

On the page we saw:
   SELECT UserID FROM Users WHERE username = 'toto'

We noticed the following: if we add an attribute: loop, scope or another existing attribute in the resultSet tag in the empty query, the query is not displayed on the JSP page. However if we add this attribute to each resultSet tag, the query is displayed...

Any idea???



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



Reply via email to