you demonstrate the how to define a JDBC connection pool anda JDBC resource (data source), and create a web application that uses a JDBCresource.
File list:
mod10_database
.............\DatabaseDemo
.............\............\build
.............\............\.....\web
.............\............\.....\...\META-INF
.............\............\.....\...\........\MANIFEST.MF
.............\............\.....\...\WEB-INF
.............\............\.....\...\.......\classes
.............\............\.....\...\.......\.......\com
.............\............\.....\...\.......\.......\...\myapp
.............\............\.....\...\.......\.......\...\.....\struts
.............\............\.....\...\.......\.......\...\.....\......\ApplicationResource.properties
.............\............\.....\...\.......\.......\sl314
.............\............\.....\...\.......\.......\.....\controller
.............\............\.....\...\.......\.......\.....\..........\AddLeagueAction.class
.............\............\.....\...\.......\.......\.....\..........\EnterPlayerAction.class
.............\............\.....\...\.......\.......\.....\..........\SelectDivisionAction.class
.............\............\.....\...\.......\.......\.....\..........\SelectLeagueAction.class
.............\............\.....\...\.......\.......\.....\model
.............\............\.....\...\.......\.......\.....\.....\League.class
.............\............\.....\...\.......\.......\.....\.....\LeagueDAO.class
.............\............\.....\...\.......\.......\.....\.....\LeagueService.class
.............\............\.....\...\.......\.......\.....\.....\ObjectIdDAO.class
.............\............\.....\...\.......\.......\.....\.....\ObjectNotFoundException.class
.............\............\.....\...\.......\.......\.....\.....\Player.class
.............\............\.....\...\.......\.......\.....\.....\PlayerDAO.class
.............\............\.....\...\.......\.......\.....\.....\RegisterService.class
.............\............\.....\...\.......\.......\.....\view
.............\............\.....\...\.......\.......\.....\....\AddLeagueFormServlet.class
.............\............\.....\...\.......\.......\.....\....\EnterPlayerFormServlet.class
.............\............\.....\...\.......\.......\.....\....\ListLeaguesServlet.class
.............\............\.....\...\.......\.......\.....\....\SelectDivisionFormServlet.class
.............\............\.....\...\.......\.......\.....\....\SelectLeagueFormServlet.class
.............\............\.....\...\.......\.......\.....\....\SuccessServlet.class
.............\............\.....\...\.......\.......\.....\....\ThankYouServlet.class
.............\............\.....\...\.......\.......\.....\web
.............\............\.....\...\.......\.......\.....\...\PerformanceFilter.class
.............\............\.....\...\.......\lib
.............\............\.....\...\.......\...\antlr.jar
.............\............\.....\...\.......\...\commons-beanutils.jar
.............\............\.....\...\.......\...\commons-digester.jar
.............\............\.....\...\.......\...\commons-fileupload.jar
.............\............\.....\...\.......\...\commons-logging.jar
.............\............\.....\...\.......\...\commons-validator.jar
.............\............\.....\...\.......\...\jakarta-oro.jar
.............\............\.....\...\.......\...\struts.jar
.............\............\.....\...\.......\struts-bean.tld
.............\............\.....\...\.......\struts-config.xml
.............\............\.....\...\.......\struts-html.tld
.............\............\.....\...\.......\struts-logic.tld
.............\............\.....\...\.......\struts-nested.tld
.............\............\.....\...\.......\struts-tiles.tld
.............\............\.....\...\.......\sun-web.xml
.............\............\.....\...\.......\tiles-defs.xml
.............\............\.....\...\.......\validation.xml
.............\............\.....\...\.......\validator-rules.xml
.............\............\.....\...\.......\web.xml
.............\............\.....\...\index.html
.............\............\.....\...\welcomeStruts.jsp
.............\............\dist
.............\............\....\ViewDemo.war
.............\............\nbproject
.............\............\.........\private
.............\............\.........\.......\private.properties
.............\............\.........\.......\private.xml
.............\............\.........\ant-deploy.xml
.............\............\.........\build-impl.xml
.............\............\.........\genfiles.properties
.............\............\.........\project.properties
.............\............\.........\project.xml
.............\............\setup
.............\............\.....\connectionPool.sun-resource
.............\............\.....\connectionPool_1.sun-resource
.............\............\.....\datasource.sun-resource
.............\............\.....\jdbc_leagueDB.sun-resource
.............\............\.....\leaguePool.sun-resource
.............\............\src
.............\............\...\conf
.............\............\...\....\MANIFEST.MF
.............\............\...\java
.............\............\...\....\com
.............\............\...\....\...\myapp
.............\............\...\....\...\.....\struts
.............\............\...\....\...\.....\......\ApplicationResource.properties
.............\............\...\....\sl314
.............\............\...\....\.....\controller
.............\............\...\....\.....\..........\AddLeagueAction.java
.............\............\...\....\.....\..........\EnterPlayerAction.java
.............\............\...\....\.....\..........\SelectDivisionAction.java
.............\............\...\....\.....\..........\SelectLeagueAction.java
.............\............\...\....\.....\model
.............\............\...\....\.....\.....\League.java
.............\............\...\....\.....\.....\LeagueDAO.java
.............\............\...\....\.....\.....\LeagueService.java
.............\............\...\....\.....\.....\ObjectIdDAO.java
.............\............\...\....\.....\.....\ObjectNotFoundException.java
.............\............\...\....\.....\.....\Player.java
.............\............\...\....\.....\.....\PlayerDAO.java
.............\............\...\....\.....\.....\RegisterService.java
.............\............\...\....\.....\view
.............\............\...\....\.....\....\AddLeagueFormServlet.java
.............\............\...\....\.....\....\EnterPlayerFormServlet.java
.............\............\...\....\.....\....\ListLeaguesServlet.java
.............\............\...\....\.....\....\SelectDivisionFormServlet.java
.............\............\...\....\.....\....\SelectLeagueFormServlet.java
.............\............\...\....\.....\....\SuccessServlet.java
.............\............\...\....\.....\....\ThankYouServlet.java
.............\............\...\....\.....\web
.............\............\...\....\.....\...\PerformanceFilter.java
.............\............\web
.............\............\...\WEB-INF
.............\............\...\.......\struts-bean.tld
.............\............\...\.......\struts-config.xml
.............\............\...\.......\struts-html.tld
.............\............\...\.......\struts-logic.tld
.............\............\...\.......\struts-nested.tld
.............\............\...\.......\struts-tiles.tld
.............\............\...\.......\sun-web.xml
.............\............\...\.......\tiles-defs.xml
.............\............\...\.......\validation.xml
.............\............\...\.......\validator-rules.xml
.............\............\...\.......\web.xml
.............\............\...\index.html
.............\............\...\welcomeStruts.jsp
.............\............\build.xml
.............\db
.............\..\SL314_initializeDemo.sql
.............\README.txt