aa.jsp
==============================
<%@ page contentType="text/html;charset=euc-kr"%>
<HTML>
<HEAD>
<style>
td{border: black 2px solid}
</style>
</HEAD>
<BODY>
<FORM action='bb.jsp'>
<table>
<tr><td>ID</td><td><input type=text name='id'></td></tr>
<tr><td>PW</td><td><input type=text name='pw'></td></tr>
<tr><td colspan=2><input type=submit value="로그인">
<input type=reset value="취소"></td></tr>
</table>
</FORM>
</BODY>
</HTML>
bb.jsp
================================
<%@ page contentType="text/html;charset=euc-kr"%>
<%
String s1=request.getParameter("id");
String s2=request.getParameter("pw");
if(s1.equals(s2)){
out.write("로그인 성공");
}else{
out.write("로그인 실패");
}
%>
'개발하자 > JSP&Servlet' 카테고리의 다른 글
request.getParameterValues (0) | 2015.02.13 |
---|---|
hidden 값전달 (0) | 2015.02.13 |
파라미터입력값 출력 (0) | 2015.02.11 |
jsp 값전달 (0) | 2015.02.11 |
웹서버 (0) | 2015.01.27 |