Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > using param or out tag inside sql tag (jsp/jstl/tomcat)

Reply
Thread Tools

using param or out tag inside sql tag (jsp/jstl/tomcat)

 
 
shahbaz
Guest
Posts: n/a
 
      10-27-2003
I'm going a little crazy with this, let's say i have the following
code:
<sql:query var="data" dataSource="jdbc/SSDB">
select * from data where variable=<cut value="${params.type}"/>
</sql:query>
In this case, the out tag just seems to get ignored!

<sql:query var="data" dataSource="jdbc/SSDB">
select * from data where variable=?
<sqlaram value="${params.type}" />
</sql:query>
In this case I get an invalid column exception. The last method is
what I prefer to use (seems cleaner) and in the online tutorial at
sun, the param tag is usable even in a simple query tag (rather than
just prepared queries).

The thing is, I had method one working some time ago when I was using
an older version of tomcat. Now I'm using Tomcat 5.0.12. I setup the
tag libs the following way:
<%@ taglib uri="/WEB-INF/c.tld" prefix="c" %>
<%@ taglib uri="/WEB-INF/sql.tld" prefix="sql" %>
When I look inside sql.tld, I get the following info:
<description>JSTL 1.1 sql library</description>
<display-name>JSTL sql</display-name>
<tlib-version>1.1</tlib-version>
<short-name>sql</short-name>
<uri>http://java.sun.com/jsp/jstl/sql</uri>
(the fact that there are c.tld, c-1_0.tld and c-1_0-rt.tld is too
confusing, so I just put relative url and tld name in jsp).

In my frustration, I set the <rtexprvalue>true</rtexprvalue> tag to
true in the <name>query</name> section of sql.tld.

Any idea what's going on here??? Thanks.

Shahbaz C.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
HTML::Template->param() : You gave me an odd number of parameters to param()! Dave Perl Misc 5 04-26-2011 02:44 AM
how do u invoke Tag b's Tag Handler from within Tag a's tag Handler? shruds Java 1 01-27-2006 03:00 AM
Overload by deriv class param; call w base class param ectoplasm C++ 12 07-28-2005 08:20 AM
Vanishing PARAM="ARCHIVE" tag Michael ASP .Net 0 03-04-2004 07:35 PM
XSLT: How to replace param name with this param's value ? Geathaa XML 2 07-30-2003 06:48 AM



Advertisments