tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kan Ogawa" <super-cr...@jcom.home.ne.jp>
Subject RE: JSTL sql tag error: No suitable driver
Date Tue, 02 Jul 2002 17:55:07 GMT
Hi, Mike.

Did you try to look up dataSource "jdbc/dev" in <sql:query> tag ???

--
Kan Ogawa
super-creek@jcom.home.ne.jp

> I'm trying to use the sql JSTL tags on JRun 4.0 and I'm not having any 
> luck with their pooled dataSources. I get the following error:
> 
>      javax.servlet.jsp.JspException: Unable to get connection, 
> DataSource invalid: "No suitable driver"
> 
> Here's how I'm using the tag:
> 
>     <%@ taglib uri="/WEB-INF/tlds/sql.tld" prefix="sql" %>
>     <%@ taglib uri="/WEB-INF/tlds/c.tld" prefix="c" %>   
>         <sql:query dataSource="dev" var="test">
>             select * from dn_user
>         </sql:query>
>         <c:forEach var="row" items="${test.rows}">
>             <c:out value="${row.login}" />
>         </c:forEach>
> 
> I also tried calling it with dataSource="java:comp/env/jdbc/dev" as 
> well. I thought it must be JRun so I tried grabbing the DataSource 
> manually and I had no problems:
> 
>     InitialContext ctx = new InitialContext();
>     DataSource ds = (DataSource) ctx.lookup("dev"); // works with 
> java:comp/env/jdbc/dev also
>     Connection dbConnection = ds.getConnection();
> 
> I also tried the dbtaglibs which worked fine as well:
> 
>     <%@ taglib uri="/WEB-INF/tlds/dbtags.tld" prefix="sql" %>
>       <sql:connection id="conn1" jndiName="dev"/>
>             <sql:statement id="stmt1" conn="conn1">
>                 <sql:query>
>                  select * from dn_user
>                 </sql:query>
>                 <sql:resultSet id="rset2">
>                     <sql:getColumn position="1"/><br>
>                 </sql:resultSet>
>            </sql:statement>
>         <sql:closeConnection conn="conn1"/>
> 
> I have no idea what's wrong. I must be missing something but I'm not 
> sure what it is.  Ugh, I need help :)
> 


--
To unsubscribe, e-mail:   <mailto:taglibs-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:taglibs-user-help@jakarta.apache.org>


Mime
View raw message