ํฐ์คํ ๋ฆฌ ๋ทฐ
728x90
SMALL
<%@ page language="java" contentType="text/html; charset=EUC-KR"
pageEncoding="EUC-KR"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!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>
<fmt:requestEncoding value="euc-kr" />
<h2>SQL ํ๊ทธ์ฐ์ต</h2>
<div>์ด๋ฆ์ ${param.name }</div>
<fieldset>
<legend>์ด๋ฆ๋ฃ๊ธฐ</legend>
<form method="post" action="">
Name : <input type="text" name="name" />
<input type="submit" value="๊ฐ์" />
</form>
</fieldset>
<c:catch var="msg"><!-- ์์ธ์ฒ๋ฆฌ์ฉ -->
<!-- Connection ์ค์ -->
<sql:setDataSource
driver="oracle.jdbc.OracleDriver"
user="user01"
password="user01"
url="jdbc:oracle:thin:@211.241.228.11:1521:orcl"
var="con"
/>
<!-- ๋ฐ์ดํฐ์ ๋ ฅ -->
<c:set var="name" value="${param.name}"/>
<sql:update dataSource="${con}">
insert into test2 values (test2_seq.nextval,?)
<sql:param value="${name }"></sql:param>
</sql:update>
<!-- ๋ฐ์ดํฐ์กฐํ -->
<sql:query var="rs" dataSource="${con}">
select * from test2
</sql:query>
<!-- ๊บผ๋ด์ -->
<c:forEach items="${rs.rows}" var="row">
${row['num']}, ${row['name']}<br/>
</c:forEach>
</c:catch>
<c:if test="${msg != null}">
${msg.message}
</c:if>
</body>
</html>
pageEncoding="EUC-KR"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!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>
<fmt:requestEncoding value="euc-kr" />
<h2>SQL ํ๊ทธ์ฐ์ต</h2>
<div>์ด๋ฆ์ ${param.name }</div>
<fieldset>
<legend>์ด๋ฆ๋ฃ๊ธฐ</legend>
<form method="post" action="">
Name : <input type="text" name="name" />
<input type="submit" value="๊ฐ์" />
</form>
</fieldset>
<c:catch var="msg"><!-- ์์ธ์ฒ๋ฆฌ์ฉ -->
<!-- Connection ์ค์ -->
<sql:setDataSource
driver="oracle.jdbc.OracleDriver"
user="user01"
password="user01"
url="jdbc:oracle:thin:@211.241.228.11:1521:orcl"
var="con"
/>
<!-- ๋ฐ์ดํฐ์ ๋ ฅ -->
<c:set var="name" value="${param.name}"/>
<sql:update dataSource="${con}">
insert into test2 values (test2_seq.nextval,?)
<sql:param value="${name }"></sql:param>
</sql:update>
<!-- ๋ฐ์ดํฐ์กฐํ -->
<sql:query var="rs" dataSource="${con}">
select * from test2
</sql:query>
<!-- ๊บผ๋ด์ -->
<c:forEach items="${rs.rows}" var="row">
${row['num']}, ${row['name']}<br/>
</c:forEach>
</c:catch>
<c:if test="${msg != null}">
${msg.message}
</c:if>
</body>
</html>
728x90
LIST
๋๊ธ
๊ณต์ง์ฌํญ
์ต๊ทผ์ ์ฌ๋ผ์จ ๊ธ
์ต๊ทผ์ ๋ฌ๋ฆฐ ๋๊ธ
- Total
- Today
- Yesterday
๋งํฌ
TAG
- ์์์ฌ์ด๋
- ๊ฒฝ์ ์ฉ์ด
- I Don't Care
- ๋์ค
- JSP
- Servlet
- ๋ด๋๋ด์ฐ
- ์ธํจ์ด
- ์๋ฆฌ
- Java
- JS
- ๋ณต๊ทผ์ด๋
- asp
- JSTL
- 2ne1
- JavaScript
- php
- ์นด๋ฐ์จ๋ผ์ธ
- ๋ฉ๋ฐฐํ
- JSON
- MySQL
- ์๋ฐ์คํฌ๋ฆฝํธ
- Ajax
- ์น์์ด์ ์
- ํจ์
- ๊ธฐํ
- jQuery
- ์๋ธ๋ฆฟ
- 8๋ง์ผ
- EL
์ผ | ์ | ํ | ์ | ๋ชฉ | ๊ธ | ํ |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
๊ธ ๋ณด๊ดํจ
250x250