> From: Propes, Barry L [mailto:[email protected]]
> Subject: RE: DB connection error -Tomcat 6 config
>
> Connection connection = null;
> Context initCtx = new InitialContext();
> Context envCtx = (Context) initCtx.lookup("java:comp/env");
> DataSource ds = (DataSource) envCtx.lookup("jdbc/myoracle");
That's what you showed us earlier, but afterwards you posted this:
> An error occurred at line: 68 in the jsp file: /chngctrl/chgctrl_details.jsp
> Type mismatch: cannot convert from Object to Context
> 66: Connection connection = null;
> 67: Context initCtx = new InitialContext();
> 68: Context envCtx = initCtx.lookup("java:comp/env");
> 69: // Look up our data source
> 70: DataSource ds = initCtx.lookup("jdbc/myoracle");
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
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you received
this in error, please contact the sender and delete the e-mail and its
attachments from all computers.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]