running this produces following error:
Unable to get connection, DataSource invalid: "java.sql.SQLException: No suitable driver found for ${database}"
I've tried these things:
1. The driver requires "ojdbc14.jar" file so I put it in both the lib(i.e in WEB-INF/lib and Tomcat/lib) but nothing solved the problem.
2. I have tried using it on both Tomcat 5.5 and Tomcat 6 but the problem still remains same.
3. I also tried to use the driver "oracle.jdbc.driver.OracleDriver" instead of "oracle.jdbc.OracleDriver" but no improvement.
4. The classpaths for ojdbc14.jar file is also set in Environment variable. One java desktop application is running fine with this driver, but I'm using it first time with JSP's JSTL.
Please help......It's been one day I'm stuck with this problem
Bear Bibeault
Author and opinionated walrus
Marshal
The JSTL SQL tags are for quick prototyping and should not be used in production code.
The error message that you are getting indicates to me that the EL is not being properly evaluated on your page. What happens when you put ${3+4} on your page? Do you see 7?
This message was edited 1 time. Last update was at by Bear Bibeault
2- put the file name in the \Tomcat 6.0\conf\Catalina\localhost directory.
3- add the following tags in the web.xml:
<resource-ref>
<description>Oracle Datasource example</description>
<res-ref-name>jdbc/TestDB</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
4- use the lookup method to get the DataSource as :
DataSource ds = (DataSource)new InitialContext().lookup( "java:comp/env/jdbc/TestDB" );
note: the names are case sensitive
Regards.
subject: java.sql.SQLException: No suitable driver found