728x90
반응형
Server.xml
---mysql---
<Resource name="jdbc/jsptesto"
auth="Container"
type="javax.sql.DataSource"
driverClassName="com.mysql.cj.jdbc.Driver"
username="ora_user"
password="1234"
url="jdbc:mysql://localhost:3306/jsptest?serverTimezone=UTC"
maxWait="5000"
/>
--Oracle ---
<Resource name="jdbc/jsptesto"
auth="Container"
type="javax.sql.DataSource"
driverClassName="oracle.jdbc.driver.OracleDriver"
maxWait="5000"
username="scott"
password="tiger"
url="jdbc:oracle:thin:@localhost:1521:orcl"
/>
web.xml
--- mysql ---
<resource-ref>
<description>jsptest db</description>
<res-ref-name>jdbc/jsptest</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
--Oracle ---
<resource-ref>
<description>jsptest oracledb</description>
<res-ref-name>jdbc/jsptesto</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
728x90
반응형
'Programming > Jsp' 카테고리의 다른 글
[JSP] 내장(기본) 객체의 속성(Attribute) (0) | 2020.07.23 |
---|---|
[JSP] 내장객체(Implicit Object)와 영역(Scope) (0) | 2020.07.21 |
[JSP/Servlet] HTTP Redirect / Dispatcher (forward, include) (0) | 2020.07.21 |
[JSP] 표현 언어 EL(Expression Language) 문법 (0) | 2020.07.14 |
[JAVA/JSP] 모델2 기반의 MVC(MODEL-VIEW-CONTROLLER) Design Pattern (0) | 2020.07.14 |