eclipse에서 apache tomcat 서버의 oracle DB 접근하기 컴퓨터공학

context.xml을 열어
<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>을 설정에 맞게 고쳐준다.

트랙백

이 글과 관련된 글 쓰기 (트랙백 보내기)
TrackbackURL : http://cubeseller.egloos.com/tb/1878340 [도움말]

덧글

댓글 입력 영역



유니클로시계

유니클로캘린더

[위자드팩토리] 오늘의 날씨

[위자드팩토리] 세이라디오

[위자드팩토리] 영어단어