JSP 내장객체 , 태그
request 내장객체
response 내장객체
정 의
☞ 웹서버가 웹브라우저에 전송한 응답 정보를 제공
☞ Forward / Redirect 방식이 있음 Forward / Redirect 란?
input 태그
예  시
| 
1 
2 
3 
4 | 
ID : <input type = "text" name = "id"> <br> 
Pw : <input type = "text" name = "pw"> <br> 
<input type = "button" value = "네이버로 가기" onclick="location.href='http://www.naver.com'"> <br> 
<input type = "button" value = "결과보기" onclick="location.href='Result.jsp?name=jang'"> <br> | cs | 
결 과
form 태그
예  시
| 
1 
2 
3 
4 
5 | 
<form action="Result.jsp"> 
아이디 : <input type = "text" name="id"> <br> 
비 번 : <input type = "password" name="pw"> <br> 
<input type="submit" value="로그인"> 
</form> | cs | 
| 
1 
2 
3 
4 | 
<% String id = request.getParameter("id"); %> 
<% String pw = request.getParameter("pw"); %> 
ID : <%= id %><br> 
PW : <%= pw %><br> | cs | 
예시 설명
☞ action이 발생하면 이동할 URL
☞ submit은 버튼처럼 생겼고, 자신이 속한 form태그의 action을 발생시킴
☞ action이 발생할 시에 form태그 내부의 모든 엘리먼트들의 name값을 valued의 값을 밸류로 해서 파리미터로 세팅
결 과
Reference : http://forl.tistory.com/70?category=630179
댓글
댓글 쓰기