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

Popular posts from this blog

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -