form.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ include file="/commons/_head.jspf" %>
<body>
<%@ include file="/commons/_top.jspf" %>
<div class="container">
<div class="row">
<div class="span12">
<section id="typography">
<div class="page-header">
<h1>회원가입</h1>
</div>
<form class="form-horizontal" action="form_action.jsp" method="post">
<div class="control-group">
<label class="control-label" for="userId">사용자 아이디</label>
<div class="controls">
<input type="text" name="userId" value="" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="password">비밀번호</label>
<div class="controls">
<input type="password" id="password" name="password" placeholder="">
</div>
</div>
<div class="control-group">
<label class="control-label" for="name">이름</label>
<div class="controls">
<input type="text" id="name" name="name" value="" placeholder="">
</div>
</div>
<div class="control-group">
<label class="control-label" for="email">이메일</label>
<div class="controls">
<input type="text" id="email" name="email" value="" placeholder="">
</div>
</div>
<div class="control-group">
<div class="controls">
<button type="submit" class="btn btn-primary">회원가입</button>
</div>
</div>
</form>
</div>
</div>
</div>
</body>
</html>
form_action.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%
String userid=request.getParameter("userId");
String password=request.getParameter("password");
String name=request.getParameter("name");
String email=request.getParameter("email");
out.println(userid+" : " +password + " : " + email + " : " + name);
%>
댓글 ( 4)
댓글 남기기