
<context> 내부에
http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html#Oracle_8i,_9i_&_10g
1. Context configuration
<Resource name="jdbc/myoracle" auth="Container"
type="javax.sql.DataSource" driverClassName="oracle.jdbc.OracleDriver"
url="jdbc:oracle:thin:@127.0.0.1:1521:mysid"
username="scott" password="tiger" maxActive="20" maxIdle="10"
maxWait="-1"/>
를 붙여준다.
여기서 각 항목을 설정에 맞게 바꿔준다.


위의 URL을 쓰면 된다.
그리고 사용할 웹 어플리케이션의 DD에
2. web.xml configuration
<resource-ref>
<description>Oracle Datasource example</description>
<res-ref-name>jdbc/myoracle</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
를 넣어주고 <res-ref-name>을 설정에 맞게 고쳐준다.


덧글
멋진놈 2010/10/11 12:50 # 삭제 답글
형 퍼가요^^고마워요!