previous | start | next

## A Three-Tier Application

    <DefaultContext>
       <Resource name="jdbc/mydb" auth="Container" type="javax.sql.DataSource"/>
       <ResourceParams name="jdbc/mydb">
          <parameter>
             <name>factory</name>
             <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
          </parameter>
          <parameter>
             <name>driverClassName</name>
             <value>driver class</value>
          </parameter>
          <parameter>
             <name>url</name>
             <value>database URL</value>
          </parameter>
          <parameter>
             <name>username</name>
             <value>database user name</value>
          </parameter>
          <parameter>
             <name>password</name>
             <value>database user password</value>
          </parameter>
       </ResourceParams>
    </DefaultContext>

previous | start | next