Chris,
Thanks for the notes. It turned out the problem (data not retrieved from
the database) was not caused by the code, but by the tomcat server. I
invoked the same jsp file and there was one more problem that the JDBC
driver could not be found. I made sure the the jdbc jar file was in place
: Thursday, February 14, 2008 9:32 AM
To: Tomcat Users List
Subject: Re: DataSource binding for JSP
Chris,
Thanks for the notes. It turned out the problem (data not retrieved from
the database) was not caused by the code, but by the tomcat server. I
invoked the same jsp file and there was one
Barry,
Thanks for your response. As you see in Chris' notes, it is safer to move
the declaration to local. So instead of
%! DataSource ds; %
%
try {
Context initCtx = new InitialContext();
I tried changing it to
%
DataSource ds = null;
try {
Context initCtx = new
ok, very good!
-Original Message-
From: Jason Ling [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 14, 2008 9:47 AM
To: Tomcat Users List
Subject: Re: DataSource binding for JSP
Barry,
Thanks for your response. As you see in Chris' notes, it is safer to move
the declaration
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Jason,
Jason Ling wrote:
| the JDBC driver could not be found. I made sure the the jdbc jar
| file was in place and rebooted the computer, and the same jsp file
| worked.
I'm glad you have solved your problem (though rebooting should not have
been
What is this?
%! DataSource ds; %
Do you need that on your page? I never run such a reference on mine. I've also
imported the following packages -
%@ page
import=javax.naming.Context,javax.naming.InitialContext,javax.naming.NamingException,javax.sql.DataSource
%
My JSP config looks like:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Jason,
Jason Ling wrote:
| When the file is invoked,
| it only returns the header row of the table (First Name, Last Name, User
| Name, Password), but does not return the expected records from the Oracle
| data table.
[snip]
| %! DataSource ds; %