tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Propes, Barry L " <>
Subject RE: DB connection error -Tomcat 6 config
Date Thu, 18 Mar 2010 22:30:04 GMT
Sorry for any confusion.

I do have my JSP source as the following:
 Connection connection = null;
 Context initCtx = new InitialContext(); Context envCtx = (Context) 
 initCtx.lookup("java:comp/env"); DataSource ds = (DataSource)  envCtx.lookup("jdbc/myoracle");
connection = ds.getConnection();

Cleaned out the work folder and restarted Tomcat; still get the "Name jdbc is not bound in
this context error."

I've had it this way since I first started trying different 6.0.x builds, I was just altering
at the suggestion of some others, and troubleshooting on my own to see if altering the Context
objects would work, but so far no luck.

This is how I've had it for about 3 years or so on my Tomcat 4.1.31 build and it's worked
 perfectly....granted that calls the Resource params in the server.xml file, which is not
workable in the 6 series.

-----Original Message-----
From: Caldarale, Charles R [] 
Sent: Thursday, March 18, 2010 5:14 PM
To: Tomcat Users List
Subject: RE: DB connection error -Tomcat 6 config

>>Since things are a bit confused now, you might want to verify that the JSP source
is what it should be (using envCtx for the lookup of "jdbc/myoracle"), >>and clean out
Tomcat's work directory in case there's something ugly left lying around in there, and restart
Tomcat, of course.

>> - Chuck

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message