태터데스크 관리자

도움말
닫기
적용하기   첫페이지 만들기

태터데스크 메시지

저장하였습니다.

[web.xml]
.
.
  <display-name>JSP60Test</display-name>
  <resource-ref>
   <res-ref-name>jdbc/mysqldb</res-ref-name>
   <res-type>javax.sql.DataSource</res-type>
   <res-auth>Container</res-auth>
  </resource-ref>
    <resource-ref>
   <res-ref-name>jdbc/oracledb</res-ref-name>
   <res-type>javax.sql.DataSource</res-type>
   <res-auth>Container</res-auth>
  </resource-ref>
.
.
.

[server.xml]:mysql Tomcat Container에서 직접 서버구동시
<GlobalNamingResources>
 <Resource name="jdbc/mysqldb" auth="Container" type="javax.sql.DataSource" driverClassName="com.mysql.jdbc.Driver" loginTimeout="10" maxWait="5000" username="jspid" password="1234" url="jdbc:mysql://localhost:3306/jsptest" />
</GlobalNamingResources>
.
.
.
.
<Context docBase="C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\JSP60Test" path="/JSP60Test" reloadable="true">
 <Resource name="jdbc/mysqldb" auth="Container" type="javax.sql.DataSource" driverClassName="com.mysql.jdbc.Driver" loginTimeout="10" maxWait="5000" username="jspid" password="1234" url="jdbc:mysql://localhost:3306/jsptest" />
</Context>

[server.xml]:mysql eclipse에서 서버구동시
<GlobalNamingResources>
 <Resource name="jdbc/mysqldb" auth="Container" type="javax.sql.DataSource" driverClassName="com.mysql.jdbc.Driver" loginTimeout="10" maxWait="5000" username="jspid" password="1234" url="jdbc:mysql://localhost:3306/jsptest" />
</GlobalNamingResources>
.
.
.
.
<Context docBase="JSP60Test" path="/JSP60Test" reloadable="true" source="org.eclipse.jst.jee.server:JSP60Test">
 <Resource name="jdbc/mysqldb" auth="Container" type="javax.sql.DataSource" driverClassName="com.mysql.jdbc.Driver" loginTimeout="10" maxWait="5000" username="jspid" password="1234" url="jdbc:mysql://localhost:3306/jsptest" />
</Context>


[server.xml]:Oracle Tomcat Container에서 직접 서버구동시
<GlobalNamingResources>
 <Resource name="jdbc/oracledb" auth="Container" type="javax.sql.DataSource" driverClassName="oracle.jdbc.driver.OracleDriver" loginTimeout="10" maxWait="5000" username="oracleuser" password="1234" url="jdbc:oracle:thin:@303c2:1521:orcl" />
</GlobalNamingResources>
.
.
.
.
<Context docBase="C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\JSP60Test" path="/JSP60Test" reloadable="true">
 <Resource name="jdbc/oracledb" auth="Container" type="javax.sql.DataSource" driverClassName="oracle.jdbc.driver.OracleDriver" loginTimeout="10" maxWait="5000" username="oracleuser" password="1234" url="jdbc:oracle:thin:@303c2:1521:orcl" />
</Context>

[server.xml]:Oracle eclipse에서 서버구동시
<GlobalNamingResources>
 <Resource name="jdbc/oracledb" auth="Container" type="javax.sql.DataSource" driverClassName="oracle.jdbc.driver.OracleDriver" loginTimeout="10" maxWait="5000" username="oracleuser" password="1234" url="jdbc:oracle:thin:@303c2:1521:orcl" />
</GlobalNamingResources>
.
.
.
.
<Context docBase="JSP60Test" path="/JSP60Test" reloadable="true" source="org.eclipse.jst.jee.server:JSP60Test">
 <Resource name="jdbc/oracledb" auth="Container" type="javax.sql.DataSource" driverClassName="oracle.jdbc.driver.OracleDriver" loginTimeout="10" maxWait="5000" username="oracleuser" password="1234" url="jdbc:oracle:thin:@303c2:1521:orcl" />
</Context>


위의 설정을 사용하는 코드는 다음처럼 한다.
<%@ page import="javax.sql.*"%>
<%@ page import="javax.naming.*"%>

<%
.
.

 Context initCtx = new InitialContext();
 Context envCtx = (Context)initCtx.lookup("java:comp/env");
 DataSource ds = (DataSource)envCtx.lookup("jdbc/MySQLDataSource");
 con = ds.getConnection();
.
.
.
%>

top
    이전 댓글 더보기
  1. Cheap Jeans 2012.05.23 11:05 신고 댓글주소 | 수정/삭제 | 댓글

    Cheap Jeans

  2. Maillot Football Pas Cher 2012.05.26 18:05 신고 댓글주소 | 수정/삭제 | 댓글

    Maillots Nationale Soccer est censé posséder commencé au sein de votre 2ème et 3ème un très grand choix de nombreuses années en Colombie-Britannique en Chine.

  3. admins 2012.05.28 14:19 신고 댓글주소 | 수정/삭제 | 댓글

    http://www.nflnikewholesale.com/nhl-jerseys-c-2325.html nhl cheap jerseys
    http://www.nflnikewholesale.com/nba-jerseys/chicago-bulls-jerseys-c-2318_2321.html cheap bulls jersey
    http://www.nflnikewholesale.com/nhl-jerseys-c-2325.html Wholesale hockey jerseys
    http://www.nflnikewholesale.com/nba-jerseys/los-angeles-lakers-jerseys-c-2318_2364.html cheap lakers jersey
    http://www.nflnikewholesale.com/nfl-jerseys-c-2206.html official nfl jerseys wholesale
    http://www.nflnikewholesale.com/nfl-jerseys-c-2206.html sale nfl jerseys
    http://www.nflnikewholesale.com/nfl-jerseys-c-2206.html nfl jerseys wholesale authentic
    http://www.nflnikewholesale.com/mlb-jerseys-c-2314.html custom baseball jerseys
    http://www.nflnikewholesale.com/mlb-jerseys-c-2314.html baseball jerseys cheap
    http://www.nflnikewholesale.com/nfl-jerseys-c-2206.html custom nfl jerseys cheap
    http://www.nflnikewholesale.com/nfl-jerseys-c-2206.html nfl store
    http://www.nflnikewholesale.com/nfl-jerseys-c-2206.html replica nfl jerseys
    http://www.nflnikewholesale.com/sports-accessory-c-2430.html Wholesale sport jerseys
    http://www.nflnikewholesale.com/nba-jerseys/chicago-bulls-jerseys-c-2318_2321.html scottie pippen jersey cheap
    http://www.nflnikewholesale.com/nfl-jerseys-c-2206.html cheap jerseys nfl
    http://www.nflnikewholesale.com/nba-jerseys-c-2318.html cheap nba jerseys from china
    http://www.nflnikewholesale.com/ncaa-jerseys-c-2323.html cheap ncaa jerseys
    http://www.nflnikewholesale.com/nfl-jerseys-c-2206.html discount nfl jerseys
    http://www.nflnikewholesale.com/nhl-jerseys-c-2325.html discount nhl jerseys
    http://www.nflnikewholesale.com/nhl-jerseys-c-2325.html nhl jerseys for sale
    http://www.nflnikewholesale.com/nba-jerseys-c-2318.html nba wholesale jerseys
    http://www.nflnikewholesale.com/mlb-jerseys-c-2314.html authentic mlb jerseys cheap
    http://www.nflnikewholesale.com/nba-jerseys/chicago-bulls-jerseys-c-2318_2321.html michael jordan jersey cheap
    http://www.nflnikewholesale.com/nba-jerseys/chicago-bulls-jerseys-c-2318_2321.html cheap michael jordan jersey
    http://www.nflnikewholesale.com/nfl-jerseys/new-york-jets-jerseys-c-2206_2222.html jets jerseys cheap
    http://www.nflnikewholesale.com/nfl-jerseys-c-2206.html Wholesale nfl authentic jerseys
    http://www.nflnikewholesale.com/custom-jerseys/customized-mlb-jerseys-c-2520_2521.html personalized mlb jerseys
    http://www.nflnikewholesale.com/nhl-jerseys-c-2325.html cheap hockey jerseys
    http://www.nflnikewholesale.com/ncaa-jerseys-c-2323.html ncaa jerseys cheap
    http://www.nflnikewholesale.com/nfl-jerseys-c-2206.html nfl authentic jerseys
    http://www.nflnikewholesale.com/nba-jerseys-c-2318.html cheap nba basketball jerseys
    http://www.nflnikewholesale.com/nhl-jerseys-c-2325.html hockey jerseys for sale
    http://www.nflnikewholesale.com/nfl-jerseys-c-2206.html cheap nfl jerseys from china
    http://www.nflnikewholesale.com/nfl-jerseys-c-2206.html authentic nfl jerseys wholesale
    http://www.nflnikewholesale.com/mlb-jerseys-c-2314.html baseball jerseys wholesale
    http://www.nflnikewholesale.com/nfl-jerseys-c-2206.html authentic nfl jerseys cheap
    http://www.nflnikewholesale.com/nfl-jerseys-c-2206.html nfl throwback jerseys wholesale
    http://www.nflnikewholesale.com/nba-jerseys-c-2318.html discount baseball jerseys
    http://www.nflnikewholesale.com/youth-jerseys/nike-youth-nfl-c-2311_3004.html kids jerseys

  4. Custom hats 2012.06.12 18:28 신고 댓글주소 | 수정/삭제 | 댓글

    Custom hats

  5. lv 2012.06.19 09:52 신고 댓글주소 | 수정/삭제 | 댓글

    <b><a href="http://www.lv-louisvuitton.net">lv</a></b> handbags are usually duke crafted properly. The logo in the handbags is in fact symmetrical. The approved bed-making application areplica

  6. lv 2012.06.19 09:52 신고 댓글주소 | 수정/삭제 | 댓글

    <b><a href="http://www.lv-louisvuitton.net">lv</a></b> handbags are usually duke crafted properly. The logo in the handbags is in fact symmetrical. The approved bed-making application areplica

  7. outlet gucci 2012.06.19 10:00 신고 댓글주소 | 수정/삭제 | 댓글

    We saw these humans buy <b><a href="http://www.outletgucci.net">outlet gucci</a></b> handbags and purses at Gucci bags, to advice you convenance abounding analytical occasions.

  8. Discount Louis Vuitton 2012.06.19 10:06 신고 댓글주소 | 수정/삭제 | 댓글

    Since its inception in 1821, the <a href="http://www.discount-louisvuitton.com"><b>Discount Louis Vuitton</b></a> bag financial atmosphere was in before some of the best designerVente Secret –

  9. cheap gucci belts 2012.07.12 16:59 신고 댓글주소 | 수정/삭제 | 댓글

    I am very thankful tI am very thankful to you for posting such stuff.This really help me lot.o you for posting such stuff.This really help me lot.

  10. Cheap Oakleys Sunglasses 2012.07.14 11:04 신고 댓글주소 | 수정/삭제 | 댓글

    A lot of thanks for all your valuable work on this article.

  11. 2012.07.14 18:36 댓글주소 | 수정/삭제 | 댓글

    비밀댓글입니다

  12. 2012.07.14 18:38 댓글주소 | 수정/삭제 | 댓글

    비밀댓글입니다

  13. 2012.07.16 15:41 댓글주소 | 수정/삭제 | 댓글

    비밀댓글입니다

  14. 2012.07.24 16:44 댓글주소 | 수정/삭제 | 댓글

    비밀댓글입니다

  15. Chanel purse 2012.07.26 18:15 신고 댓글주소 | 수정/삭제 | 댓글

    With a fou<a href="http://www.hermeshandbagz.com">Hermes Outlet</a><a href="http://www.hermeshandbagz.com">hermes 2012</a>r inches heel accompl<a href="http://www.hermeshandbagz.com">hermes handbags</a><a href="http://www.hermeshandbagz.com">hermes store</a><a href="http://www.discountchanelpurse.com">chanel purse</a>i<a href="http://www.discountchanelpurse.com">chanel outlet</a>sh <a href="http://www.discountchanelpurse.com">chanel wallet</a>these Tor<a href="http://www.louisvuittonlatestprice.com/">Louis Vuitton Prices</a><a href="http://www.louisvuittonlatestprice.com/">Louis Vuitton Outlet</a>y burch pumps added womanly E<a href="http://www.hermesoutletforcheap.com/">Hermes On sale</a>ach time<a href="http://www.hermesoutletforcheap.com/">Hermes Outlet</a><a href="http://www.discountchanelpurse.com">chanel on sale</a> the plan<a href="http://www.hermeshandbagz.com">hermes on sale</a><a href="http://www.hermeshandbagz.com/belts-c-6.html">discount Hermes Belts</a><a href="http://www.hermeshandbagz.com/walle
    ts-c-2.html">Hermes Wallets</a>t is easy to think of h<a href="http://www.hermeshandbagz.com/constance-c-17.html">Hermes Constance handbags</a>igh<a href="http://www.hermeshandbagz.com/birkin-c-7.html">Hermes Birkin handbags</a> heelsExpo exper<a href="http://www.discountchanelpurse.com/chanel-255-c-73.html">Chanel 2.55 handbags</a>iencetory bur<a href="http://www.discountchanelpurse.com/chanel-classic-bags-c-74.html">Chanel Classic Bags</a>ch Shop Special Sa<a href="http://www.discountchanelpurse.com/chanel-coco-cocoon-bags-c-80.html">Chanel Coco Cocoon Bags</a>le<a href="http://www.discountchanelpurse.com/chanel-butterfly-flap-bags-c-72_81.html">Chanel Butterfly Flap Bags</a><a href="http://www.discountchanelpurse.com/chanel-clutch-bags-c-72_79.html">Chanel Clutch Bags</a><a href="http://www.discountchanelpurse.com/chanel-cc-logo-bags-c-72_75.html">Chanel CC Logo Bags</a><a href="www.discountchanelpurse.com/chanel-bowling-bags-c-72_76.html">discount Chanel Bowling Bags</a> <a href="http://www.hermesoutletfo
    rcheap.com/hermes-bags-hermes-constance-c-16_32.html">Hermes Constance bags</a>T<a href="http://www.louisvuittonlatestprice.com/messenger-bags-c-6.html">Louis Vuitton Messenger Bags</a>ory Bur<a href="http://www.hermesoutletforcheap.com/hermes-bags-c-16.html">discount Hermes bags</a><a href="http://www.louisvuittonlatestprice.com/louis-vuitton-others-wallet-c-15_13.html">Louis Vuitton Wallet</a>c<a href="http://www.louisvuittonlatestprice.com/louis-vuitton-others-backpacks-c-15_1.html">Louis Vuitton Backpacks</a>h Flip Fl<a href="http://www.louisvuittonlatestprice.com/louis-vuitton-others-shoes-c-15_7.html">Louis Vuitton Shoes</a>ops online
    <a href="http://www.hermesoutletforcheap.com/hermes-accessories-hermes-wallets-c-35_19.html">Hermes Wallets</a>

  16. hermes outlet 2012.07.26 18:15 신고 댓글주소 | 수정/삭제 | 댓글

    http://www.hermeshandbagz.com

  17. Handmade Oil Paintings 2012.08.20 14:30 신고 댓글주소 | 수정/삭제 | 댓글

    <a href="http://www.9sart.com">Handmade Oil Paintings</a> are difficult to find out now. More and more <a href="http://www.9sart.com">Oil Paintings</a> can be made by machine. Where to find a <a href="http://www.9sart.com">Oil Painting Supplier</a> to offer <a href="http://www.9sart.com/people/10070-painting-of-mother-and-child-oil-paintings.html">Painting Of Mother And Child </a> , <a href="http://www.9sart.com/people/10111-famous-paintings-with-people-nsnfp0015-oil-paintings.html">Famous Paintings With People</a>, <a href="http://www.9sart.com/people/10135-nude-art-oil-painting-nsnfp0039-oil-paintings.html">nude paintings art</a> without machine? 9sart.com would be the one. http://www.9sart.com/

  18. Cheap Air Jordans 2012.08.24 18:18 신고 댓글주소 | 수정/삭제 | 댓글

    Cheap Air Jordans is known as the good brand . dcyh10120824

  19. <p>The warm bootsAB will bring you a comfortable winter <a href= 2012.09.10 11:08 신고 댓글주소 | 수정/삭제 | 댓글

    <p>The warm bootsAB will bring you a comfortable winter <a href="http://www.google.com/">news</a> because the function of keeping warm is unrivaled and you will never feel regret if you buy one from our warm online store.</p>

  20. <p>The warm bootsAB will bring you a comfortable winter <a href= 2012.09.10 11:09 신고 댓글주소 | 수정/삭제 | 댓글

    The warm bootsAB will bring you a comfortable winter [url=http://www.google.com/]news[/url] because the function of keeping warm is unrivaled and you will never feel regret if you buy one from our warm online store.

Write a comment