wood burning stoves*
The moose likes Tomcat and the fly likes Problem with JSTL sql library in JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Problem with JSTL sql library in JSP" Watch "Problem with JSTL sql library in JSP" New topic
Author

Problem with JSTL sql library in JSP

Purushoth Thambu
Ranch Hand

Joined: May 24, 2003
Posts: 425
Hi,

I am using Tomcat 5.0.27,

I am trying to use the JSTL sql library in the JSP file. I registered JDBC with JNDI. The problem is with JSTL sql library. When I try to use the JDBC/JNDI in servlet I don't face any problem.

I copied the jstl.jar and standard.jar to common\lib folder and well as my applications WEB-INF\lib folder.

Below is the test jsp

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql" %>

<sql:query var="rs" dataSource="jdbc/BramhaDB">
select ename from emp
</sql:query>

<html>
<head>
<title>DB Test</title>
</head>
<body>

<h2>Results</h2>
<c:forEach var="row" items="${rs.rows}">
Foo <c ut value="${row.empno}" /> <br/>
</c:forEach>

</body>
</html>

Output
======

Results
Foo ${row.empno}

I guess there is some problem with some setup.. please let me know how to make the sql tag library work.. core library is working fine..
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with JSTL sql library in JSP
 
Similar Threads
sql:query error "No suitable driver"
How to get a connection from the connection pool in a servlet
Connection pooling for Ms SQL
Database connectivity issue
How to retrieve data from database, using servlet or a jsp?