getting datasource in a JSP?

2005-03-08 Thread Darryl Wagoner
Greetings, I am trying to follow some of the examples and got some more questions and problems. I think the main problem is that I haven't found the import for the Context class. Should this a class in common/lib to get the connection? thanks %@ page import = java.io.* import =

Re: getting datasource in a JSP?

2005-03-08 Thread Rahul Akolkar
javax.naming.Context On Tue, 08 Mar 2005 09:32:19 -0500, Darryl Wagoner [EMAIL PROTECTED] wrote: snip I think the main problem is that I haven't found the import for the Context class. snap - To unsubscribe, e-mail: [EMAIL

Re: getting datasource in a JSP?

2005-03-08 Thread Darryl Wagoner
Rahul Akolkar wrote: javax.naming.Context Thank Rahul that help, but now I have another problem. When I use the tomcat example JSP tags page: This works *** %@ taglib uri=http://java.sun.com/jsp/jstl/sql;

Re: getting datasource in a JSP?

2005-03-08 Thread Parsons Technical Services
Try jdbc/rofDB Doug - Original Message - From: Darryl Wagoner [EMAIL PROTECTED] To: Tomcat Users List tomcat-user@jakarta.apache.org Sent: Tuesday, March 08, 2005 4:15 PM Subject: Re: getting datasource in a JSP? Rahul Akolkar wrote: javax.naming.Context Thank Rahul that help, but now

Re: getting datasource in a JSP?

2005-03-08 Thread Peter Johnson
: Darryl Wagoner [EMAIL PROTECTED] To: Tomcat Users List tomcat-user@jakarta.apache.org Sent: Tuesday, March 08, 2005 4:15 PM Subject: Re: getting datasource in a JSP? Rahul Akolkar wrote: javax.naming.Context Thank Rahul that help, but now I have another problem. When I use the tomcat example JSP

Re: getting datasource in a JSP?

2005-03-08 Thread Darryl Wagoner
Peter Johnson wrote: As shown in the examples Context initContext = new InitialContext(); Context envContext = (Context)initContext.lookup(java:/comp/env); DataSource ds = (DataSource)envContext.lookup(jdbc/rofDB); Thanks for the quick reply! That has solved the problem! -- Darryl