일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- 플러터
- flutter 총정리
- php ftp upload
- db connect
- ftp연동
- 문자치환
- Review
- StoreKit
- android function
- php 문자치환
- flutter 완벽 가이드
- flutter 실행하기
- Flutter 설치
- 크기 리사이즈
- flutter 설치하기
- 검색구현
- flutter 환경설정
- ftp download
- php
- 정규식 문자치환
- page navigation
- SKStoreReviewController
- flutter getting started
- AppStore
- flutter 앱 만들기
- ftp upload
- php 게시판
- regexp
- Swift
- php ftp download
Archives
- Today
- Total
AppleTree iOS
[jsp 내장객체]jsp 내장객체 예제 본문
◆jsp 내장객체 예제로
aaa.html에서
이름, 학번, 성별, 국적을 입력받아
bbb.jsp에 나타내는 소스 코드의 예)
◆aaa.html◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆
<!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>
<h2>학생 정보 입력</h2><br>
<form method="post" action="bbb.jsp">
이름 : <input type="text" name="irum"><br>
학번 : <input type="text" name="hak"><br>
성별 : 남자<input type="radio" name="sex" value="man">
여자<input type="radio" name="sex" value="woman"><br>
국적 : <select name="nation">
<option value="Korea">한국</option>
<option value="Japan">일본</option>
<option value="China">중국</option>
<option value="etc">기타</option>
</select><p>
<input type="submit" value="보내기">
</form>
</body>
</html>
◆bbb.jsp◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆
<%@ page language="java" contentType="text/html; charset=EUC-KR"
pageEncoding="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>
<% request.setCharacterEncoding("euc-kr"); %>
<% String name = request.getParameter("irum");%>
<% String hakban = request.getParameter("hak");%>
<% String sex = request.getParameter("sex"); %>
<% String nation = request.getParameter("nation"); %>
이름 : <%= name %><br>
학번 : <%= hakban %><br>
성별 : <%= sex %><br>
국적 : <%= nation %><br>
</body>
</html>
aaa.html에서
이름, 학번, 성별, 국적을 입력받아
bbb.jsp에 나타내는 소스 코드의 예)
◆aaa.html◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆
<!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>
<h2>학생 정보 입력</h2><br>
<form method="post" action="bbb.jsp">
이름 : <input type="text" name="irum"><br>
학번 : <input type="text" name="hak"><br>
성별 : 남자<input type="radio" name="sex" value="man">
여자<input type="radio" name="sex" value="woman"><br>
국적 : <select name="nation">
<option value="Korea">한국</option>
<option value="Japan">일본</option>
<option value="China">중국</option>
<option value="etc">기타</option>
</select><p>
<input type="submit" value="보내기">
</form>
</body>
</html>
◆bbb.jsp◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆
<%@ page language="java" contentType="text/html; charset=EUC-KR"
pageEncoding="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>
<% request.setCharacterEncoding("euc-kr"); %>
<% String name = request.getParameter("irum");%>
<% String hakban = request.getParameter("hak");%>
<% String sex = request.getParameter("sex"); %>
<% String nation = request.getParameter("nation"); %>
이름 : <%= name %><br>
학번 : <%= hakban %><br>
성별 : <%= sex %><br>
국적 : <%= nation %><br>
</body>
</html>
'JAVA > JSP' 카테고리의 다른 글
java2 - 12일째 (0) | 2010.09.24 |
---|---|
java2 - 8일째 (0) | 2010.09.17 |
java2 - 7일째 (0) | 2010.09.16 |
java2 - 6일째 (0) | 2010.09.15 |
java2 - 5일째 (0) | 2010.09.14 |