Create META-INF/context.xml

<Context  docBase="appName" path="/" reloadable="true" >

    <Resource name="develop" auth="Container" type="javax.sql.DataSource" maxActive="50        
          maxIdle="30" maxWait="10000" username="test"    password="test"

        driverClassName="oracle.jdbc.OracleDriver" url="jdbc:oracle:thin:@192.168.36.250:1521:XE" />

</Context>

 

web.xml configuration

 

<resource-ref>
        <description>jdbc Datasource example</description>
        <res-ref-name>develop</res-ref-name>
        <res-type>javax.sql.DataSource</res-type>
        <res-auth>Container</res-auth>
      </resource-ref>