⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 register.jsp

📁 简单的流言板系统,用myeclipse进行编写的,采用简单的jstl+javabean+servlet+jsp,属于三层架构.
💻 JSP
字号:
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@include file="./tags.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>User Register</title>
</head>
<script type="text/javascript" language="javascript">
function formSubmit(method){
document.forms[0].action='<%=request.getContextPath()%>/Register?method=' + method ;
return true;
} 
</script>
<body>
<br>
<br>
<table align="center">
	<tr>
		<td><span style="text-align: center;"><font
			style="font: bold; font-size: xx-large; text-align: center;">Welcome
		to CQ Message System</font></span></td>
	</tr>
</table>
<c:if test="${userName != null}">
	<table align="right">
		<tr>
			<td style="font-size: x-small; font-weight: lighter;">Welcome <c:out
				value="${userName}" /><a href="<%=request.getContextPath()%>/User?method=logout"> Logout</a></td>
		</tr>
	</table>
</c:if>
<br>
<hr>

<form action="" method="post">

<table border="0" align="center">
	<tr>
		<td style="font: normal; font-size: large; color: blue;">User
		Quick Register</td>
	</tr>
</table>
<table border="1" cellpadding="0" cellspacing="0" align="center"
	style="font-weight: lighter; font-size:x-small;">
	<tr>
		<td>User Name:</td>
		<td><input type="text" name="uName" value="<c:if test="${uName != null }">${uName}</c:if>"/></td>
	</tr>
	<tr>
		<td>User Password:</td>
		<td><input type="password" name="uPassword" value="<c:if test="${uPassword != null }">${uPassword}</c:if>" /></td>
	</tr>
	<tr>
		<td>Password Confirm:</td>
		<td><input type="password" name="pConfirm" value="<c:if test="${pConfirm != null }">${pConfirm}</c:if>"/></td>
	</tr>
	<tr>
		<td>User E-mail:</td>
		<td><input type="text" name="uMail" value="<c:if test="${uMail != null }">${uMail}</c:if>"/></td>
	</tr>
	<tr>
        <td>CheckCode:</td>
    	<td>
    	    <input type="text" name="random" maxlength="4">
    	    <img src="imgcode">
    	    </td>
    </tr>
	<tr>
		<td colspan="2" align="center"><input type="submit" name="cancel"
			value="Cancel" onclick="formSubmit('Cancel')" /> <input
			type="submit" name="register" value="Register"
			onclick="formSubmit('Register')" /></td>
	</tr>
</table>
<!-- show error when necessery -->
<table border="0" align="center">
	<tr>
		<td style="color: red;"><c:if test="${error != 'null'}">
			<c:out value="${error }" />
		</c:if></td>
	</tr>
</table>
</form>
<jsp:include page="./footer.jsp"></jsp:include>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -