java - Tomcat jdbc pool doesn't work -
i having slight problem using jdbc tomcat pool. have defined resource in context.xml, referring in web.xml. in database access method, somehow data source when user database. however, when type in:
context initctx = new initialcontext(); context envctx = (context) initctx.lookup("java:comp/env"); datasource ds = (datasource) envctx.lookup("jdbc/testdb");
i error message "initialcontext cannot resolved type". problem here?
be sure import initialcontext
, sounds missing compiler.
Comments
Post a Comment