관리 메뉴

moozi

11/10 dbcp.jsp 본문

TIS_2020/빅데이터2020_1기

11/10 dbcp.jsp

moozi 2020. 11. 10. 11:31
<%@page import="java.sql.Connection"%>
<%@page import="javax.sql.DataSource"%>
<%@page import="javax.naming.InitialContext"%>
<%@page import="javax.naming.Context"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<%
Context initContext = new InitialContext();
Context envContext  = (Context)initContext.lookup("java:/comp/env");
DataSource ds = (DataSource)envContext.lookup("jdbc/myoracle");
Connection conn = ds.getConnection();
out.println("DBCP연동성공");
%>
</body>
</html>

'TIS_2020 > 빅데이터2020_1기' 카테고리의 다른 글

11/18 node.js  (0) 2020.11.18
11/10 dbcp 연결 server.xml코드  (0) 2020.11.10
11/10 dbcp.jsp  (0) 2020.11.10
11/10 allMember.jsp  (0) 2020.11.10
cookie와 session  (0) 2020.11.06
11/03 myapp. 함수형 컴포넌트, 클래스형 컴포넌트 정리  (0) 2020.11.02
0 Comments
댓글쓰기 폼