Creating a JNDI DBCP Connection Pool

Copy the source code below into a file called web.xml in your application's WEB-INF folder.

Your application directory structure will look something like this:

Source Code (Copy and Paste): <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4"> <!-- Note there are no resource-reference tags required here, because they come from context.xml automatically. --> <!-- This is a minimal web.xml - it doesn't even have a description for the application. Feel free to add whatever else you need. --> </web-app>