DataSource Problem - JSTL

Hi,

I have created a JDBC DataSource under Sun App Server 8.1 Admin with JNDI name "jdbc/gms". I have configured the web.xml as follows.

<context-param>

<param-name>javax.servlet.jsp.jstl.sql.dataSource</param-name>

<param-value>jdbc/gms</param-value>

</context-param>

<resource-ref>

<description>GMS Data Source</description>

<res-ref-name>jdbc/gms</res-ref-name>

<res-type>javax.sql.DataSource</res-type>

<res-auth>Container</res-auth>

</resource-ref>

and sun-web.xml ....

<resource-ref>

<res-ref-name>jdbc/gms</res-ref-name>

<jndi-name>jdbc/gms</jndi-name>

</resource-ref>

Now, I am trying the following Query in JSTL after setting datasource.

<sql:setDataSource dataSource="jdbc/gms" />

<sql:query var="classificationQry">

select classification_id, classification

from tblclassification

</sql:query>

When I run the page, I am getting following error.

javax.servlet.ServletException: Unable to get connection, DataSource invalid: "java.sql.SQLException: No suitable driver"

Please help.

[1297 byte] By [vmrao] at [2007-11-26 6:58:27]
# 1
The error states that it cant find the driver.Just set classpath to point to the JDBC driver *jar file you are using. Refer to this guide for configuring driver http://docsview.sfbay/app/docs/doc/819-3658/6n5s5nklk?a=view
1xpert at 2007-7-6 15:34:50 > top of Java-index,Application & Integration Servers,Application Servers...
# 2
The link does not work.Also, I wrote Java code (Context Object, DataSource Object ... etc) to test the JNDI Datasource on the same page and it works fine. I am not sure why JSTL is not able to find the JNDI name.
vmrao at 2007-7-6 15:34:50 > top of Java-index,Application & Integration Servers,Application Servers...
# 3
Sorry, here is the working one http://docs.sun.com/app/docs/doc/819-2554/6n4r8s7n8?a=view
1xpert at 2007-7-6 15:34:50 > top of Java-index,Application & Integration Servers,Application Servers...