C
Chris ( Val )
Hi all,
Lets say I want to include some 'context' parameters for database
access as follows:
<context-param>
<param-name>DriverClassName</param-name>
<param-value>oracle.jdbc.driver.OracleDriver</param-value>
</context-param>
<context-param>
<param-name>JdbcURL</param-name>
<param-value>jdbcracle:thinlocalhost:1521:XE</param-value>
</context-param>
I obtain their values via the "getInitParameter(...)" method of the
application.
I have seen them used in both the Tomcat global 'web.xml' file
in the 'conf' directory, and also in the 'web.xml' file local to each
deployed application.
Is there a diffinitive answer on which is the best place do put
these parameters?
Also, is this form of database access still used, or is a databse
connection pool the preferred way?
If so, when is this kind of method used?
Thanks,
Chris
Lets say I want to include some 'context' parameters for database
access as follows:
<context-param>
<param-name>DriverClassName</param-name>
<param-value>oracle.jdbc.driver.OracleDriver</param-value>
</context-param>
<context-param>
<param-name>JdbcURL</param-name>
<param-value>jdbcracle:thinlocalhost:1521:XE</param-value>
</context-param>
I obtain their values via the "getInitParameter(...)" method of the
application.
I have seen them used in both the Tomcat global 'web.xml' file
in the 'conf' directory, and also in the 'web.xml' file local to each
deployed application.
Is there a diffinitive answer on which is the best place do put
these parameters?
Also, is this form of database access still used, or is a databse
connection pool the preferred way?
If so, when is this kind of method used?
Thanks,
Chris