一.注册
这个注册的人员是一般用户,使用用户名进行注册,会对这个用户名进行判断,数据库中没有这个用户名,注册成功。
1.1 JSP页面
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<!--[if IE 8]>
<html xmlns="http://www.w3.org/1999/xhtml" class="ie8" lang="zh-CN">
<![endif]-->
<!--[if !(IE 8) ]><!-->
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-CN">
<!--<![endif]-->
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-CN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>${options.optionSiteTitle} ‹ 注册</title>
<link rel="stylesheet" href="/plugin/font-awesome/css/font-awesome.min.css">
<link rel="shortcut icon" href="${pageContext.request.contextPath}/img/logo.jpg">
<link rel='stylesheet' id='dashicons-css' href='/plugin/login/dashicons.min.css' type='text/css' media='all' />
<link rel='stylesheet' id='buttons-css' href='/plugin/login/buttons.min.css' type='text/css' media='all' />
<link rel='stylesheet' id='forms-css' href='/plugin/login/forms.min.css' type='text/css' media='all' />
<link rel='stylesheet' id='l10n-css' href='/plugin/login/l10n.min.css' type='text/css' media='all' />
<link rel='stylesheet' id='login-css' href='/plugin/login/login.min.css' type='text/css' media='all' />
<style type="text/css">
body{
font-family: "Microsoft YaHei", Helvetica, Arial, Lucida Grande, Tahoma, sans-serif;
background: url(/resource/assets/img/back.jpg);
width:100%;
height:100%;
}
.login h1 a {
background-size: 220px 50px;
width: 220px;
height: 50px;
padding: 0;
margin: 0 auto 1em;
}
.login form {
background: #fff;
background: rgba(255, 255, 255, 0.6);
border-radius: 2px;
border: 1px solid #fff;
}
.login label {
color: #000;
font-weight: bold;
}
#backtoblog a, #nav a {
color: #fff !important;
}
</style><meta name='robots' content='noindex,follow' />
<meta name="viewport" content="width=device-width" />
<style>
body {
background-repeat: no-repeat;
background-size: 100% 100%;
background-attachment: fixed;
}
</style>
</head>
<body class="login login-action-login wp-core-ui locale-zh-cn">
<div id="login">
<h1><a href="/" title="欢迎您光临本站!" tabindex="-1">${options.optionSiteTitle}</a></h1>
<%
String username = "";
String password = "";
%>
<form name="registerForm" id="registerForm" method="post">
<p>
<label for="user_login">用户名<br />
<input type="text" name="username" id="user_login" class="input" value="<%=username%>" size="20" required/></label>
</p>
<p>
<label for="user_pass">密码<br />
<input type="password" name="password" id="user_pass" class="input" value="<%=password%>" size="20" required/>
</label>
</p>
<p class