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???

--
Mickaël Cappozzo
[EMAIL PROTECTED]

-------------------------------------------
NetUnion SARL
Avenue de Villamont, 19
1005 Lausanne
SWITZERLAND
Phone: (+41) 21 351 53 66
http://www.netunion.com
-------------------------------------------



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



Reply via email to