On 8/7/2004 8:24 AM, ohaya wrote:
[snipped]Hi,
I just got Tomcat 5.0.27 installed (with Apache 2.0.50), and am trying to get a simple JDBC JSP working. The JSP is called 'test.jsp'.
I have the JDBC-ODBC bridge installed and am going through that. I've been using the bridge driver from standalone Java applications, so I think that is working ok, but even with a really simple JSP, I'm getting an "Name jdbc is not bound in this context" error.
I'm including my server.xml, test.jsp, and the error details below.
I was wondering if anyone could tell me what I'm doing wrong?
and here's my JSP:
...
Context ic = new InitialContext();
DataSource ds = (DataSource) ic.lookup("java:comp/env/jdbc/jimnew");
I'm not a JNDI expert but you can try this:
Context ic = new InitialContext();
Context ctx = (Context) ic.lookup("java:comp/env");
DataSource ds = (DataSource) ic.lookup("jdbc/jimnew");-- Dennis Dai [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
