|
-
DataSource invalid
Hi,
I created a JDBC resource called "jdbc/gms" under SUN JSAS admin. I am trying SQL query using JSTL tag in a JSP page as follows.
<sql:query var="learning" dataSource="jdbc/gms">
Query
</sql:query>
I am getting the error as DataSource invalid: "java.sql.SQLException: No suitable driver".
Instead, If I use the following code it is working properly.
<%
Connection connection = null;
InitialContext ctx = new InitialContext();
DataSource ds = (DataSource) ctx.lookup("jdbc/gms");
connection=ds.getConnection();
Statement stmt = connection.createStatement();
String sqlquery="My Query";
ResultSet rs = stmt.executeQuery(sqlquery);
%>
I am not sure why JSTL SQL Query is not working. Please help.
Similar Threads
-
By premartha in forum ASP.NET
Replies: 1
Last Post: 11-19-2005, 01:13 AM
-
Replies: 1
Last Post: 03-12-2002, 04:40 AM
-
By justin in forum VB Classic
Replies: 0
Last Post: 04-21-2000, 04:24 PM
-
By Justin M in forum VB Classic
Replies: 0
Last Post: 04-19-2000, 12:19 PM
-
By Nick Koszykowski in forum VB Classic
Replies: 0
Last Post: 03-28-2000, 02:21 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks