Hi,
If I am using the follwoing lines to connect to the database in my jsp
Context initContext = new InitialContext();
Context envContext = (Context)initContext.lookup("java:/comp/env");
DataSource ds = (DataSource)envContext.lookup("jdbc/myoracle");
Connection conn = ds.getConnection();
then, where does the following lines go
<Resource name="jdbc/myoracle" auth="Container" type="javax.sql.DataSource" />
<ResourceParams name="jdbc/myoracle">
<parameter>
<name>factory</name>
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
</parameter>
<parameter>
<name>driverClassName</name>
<value>oracle.jdbc.driver.OracleDriver</value>
</parameter>
<parameter>
<name>url</name>
<value>jdbc:oracle:thin:@localhost:1521:bidla2</value>
</parameter>
<parameter>
<name>username</name>
<value>a</value>
</parameter>
<parameter>
<name>password</name>
<value>b</value>
</parameter>
</ResourceParams>
If it goes into my application.xml, then what should be the structure of my application.xml be ?? My application.xml already has the following lines:
<application>
<display-name>Bidla</display-name>
<module>
<web>
<web-uri>Bidla.war</web-uri>
<context-root>/Bidla</context-root>
</web>
</module>
</application>
I am using JBoss as my server. Please help. Thanks !