Devlec.com Javacstudy.com
MyÆäÀÌÁö |  óÀ½»ç¿ëÀÚ ÀÌ¿ë¾È³» |  ÀÌ¿ë¹®ÀÇ |  ȸ»ç¼Ò°³

¡á Æ©ÅÍ°Ô½ÃÆÇ Article Number : 21795

¿ÀÇö¼®´ÔÀÌ ÀÛ¼ºÇϽŠ³»¿ëÀÔ´Ï´Ù. 2015-03-18   |   Refer : 646
÷ºÎÆÄÀÏ : None   À̹ÌÁö : None ŸÀÔ : °ø°³±Û

<%@page import="java.sql.Connection"%>
<%@page import="javax.sql.DataSource"%>
<%@page import="javax.naming.Context"%>
<%@page import="javax.naming.InitialContext"%>
<%@ page contentType="text/html; charset=EUC-KR"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=EUC-KR">
<title>Insert title here</title>
</head>
<body>
<H1>jndi ¼³Á¤ Å×½ºÆ®</H1>
<%
 try{
  Context ctx = new InitialContext();
  DataSource ds = (DataSource)ctx.lookup("java:comp/env/jdbc/OracleDB");
  Connection con = ds.getConnection();
  
  if(con != null)
   out.println("¿¬°á ¼º°ø...");
 }
 catch(Exception err){}
%>
</body>
</html>

 

 

 

ÀÌ·¸°Ô JDNITest.jsp¸¦ ¸¸µé°í ½ÇÇàÇߴµ¥

¿¬°á¼º°øÀÌ ¾È¶°¿ä

 

ÅèĹ 8.0ÀÌ¶ó¼­ ±×·±°É±î¿©?

 

server.xml

 

web.xml µÎ°³ÀÇ

¼³Á¤Àº °ÅÀÇ ¶È°°ÀÌ ÇÑ°Í °°Àºµ¥

 

¿Ö ±×·±°É±î¿© ¾Ë·ÁÁÖ½Ã¸é ¤£¤£

 

 

 

 

 

 

·Îµù½Ã°£ : 0.016 sec
±Û ´äº¯   ±Û ¼öÁ¤   ±Û »èÁ¦   ±Û ¸ñ·Ï


   
   
Ȩ ȸ»ç¼Ò°³ ÀÌ¿ë¾à°ü °³ÀÎÁ¤º¸ º¸È£Á¤Ã¥ ÀÌ¿ë¾È³» Q&A FAQ Guide