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

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -