el_form
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<form action="el_form_ok.jsp" method="post">
이름:<input type="text" name="name"><br>
아이디:<input type="text" name="id"><br>
비밀번호:<input type="password" name="pw"><br>
<input type="submit" value="확인">
</form>
</body>
</html>
el_form_ok
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%request.setCharacterEncoding("utf-8"); %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<!-- param.태그이름으로 한번에 받아서 사용합니다 -->
${param.name }<br>
${param.id }<br>
${param.pw }<br>
</body>
</html>
param으로 받아올 수 있다.
태그이름으로 한번에 받아올 수 있어서 get을 안써도 된다.
'JSP' 카테고리의 다른 글
221202 EL태그 session과 application으로 받기 (0) | 2022.12.02 |
---|---|
221202 EL object로 받기 (0) | 2022.12.02 |
221202 EL (0) | 2022.12.02 |
221202 자바빈 (0) | 2022.12.02 |
221201 session실습 redirection에 메시지 추가 (0) | 2022.12.01 |