tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Todd Sprague" <t...@pcavionics.com>
Subject Expression tag not evaluated inside custom tag body
Date Thu, 05 Aug 2004 00:57:35 GMT
I'm using the old JDBC tags from the Advanced JSP book, under Tomcat
4.1.29/Apache 2.0.48 on Linux 9.  

The expression tags are not being evaluated inside my query tag, although
the same stuff works under Tomcat 3.2.3.

For example, the following JSP snippet will work:

<database:query update='false' id='test'>
  SELECT ID,Name From User WHERE Zip=96332
</database:query>

But the following won't:

<database:query update='false' id='test'>
  SELECT ID,Name From User WHERE Zip=<%= strZip %>
</database:query>

The <%= strZip %> shows up in the body text that my custom tag ends up
passing to the database.  How can I tell Tomcat that the expressions in this
text must be evaluated?

My TLD for the query tag is as follows:

        <tag>
                <name>query</name>
                <tag-class>tags.jdbc.QueryTag</tag-class>
                <body-content>JSP</body-content>
                <attribute>
                        <name>id</name>
                        <required>true</required>
                        <rtexprvalue>true</rtexprvalue>
                </attribute>
                <attribute>
                        <name>scope</name>
                        <required>false</required>
                        <rtexprvalue>true</rtexprvalue>
                </attribute>
                <attribute>
                        <name>update</name>
                        <required>false</required>
                        <rtexprvalue>true</rtexprvalue>
                </attribute>
        </tag>

Thanks for any help you can lend!

Todd


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message