title: Tomcat jdbc pool doesn't work
body: <p>I am having a slight problem with using JDBC tomcat pool. I have properly defined the resource in context.xml, as well as referring to it in web.xml. Now in my Database access method, I would like to somehow get a data source for when a user get something from the database. However, when I type this in: </p>
  
  <pre><code>Context initCtx = new InitialContext();
  Context envCtx = (Context) initCtx.lookup("java:comp/env");
  DataSource ds = (DataSource) envCtx.lookup("jdbc/testDB");
  </code></pre>
  
  <p>I get the error message "InitialContext cannot be resolved to a type". What is the problem here?</p>