Tomcat 4.1 introduced JSP custom tag pooling in the JSP engine.
JSP custom tag pooling can improve performance of JSP a great deal
but the downside is that it can break older JSP tag libraries which
may have bugs when used this way.  This may be what you are seeing
with DbTags.

You can disable JSP custom tag pooling by setting the JspSservlet
init parameter enablePooling to false in your tomcat conf/web.xml.

Regards,

Glenn


Mickael Cappozzo wrote:
Hello Martin,

I read your problem, we experienced this behaviour also during the testing to understand if I was doing something wrong or not...

We checked also the taglibs sources and we didn't find any answers :-(

However, we used the same dbtags before under tomcat 4.0 and it worked, but with tomcat 4.1 it doesn't, this is also strange...

Greetings,

Mickaël.

Martin van Dijken wrote:

Hey Mickael,

I just noticed the exact same thing under totally different circumstances. I posted about it and haven't heard from anybody. Has nobody else had this?

I checked the Jakarta-taglibs cvs and it seems the sql:resultset tag is doing everything correctly, although we both know it's not.

I've created a new bug in bugzilla and put yours and my message there.

check:
http://issues.apache.org/bugzilla/show_bug.cgi?id=22927

Greetings,

Martin van Dijken



-----Original Message-----
From: Mickael Cappozzo [mailto:[EMAIL PROTECTED]
Sent: donderdag 4 september 2003 10:50
To: 'Tomcat Users List'; [EMAIL PROTECTED]
Subject: dbtags and tomcat 4.1


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]




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






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





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



Reply via email to