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

📄 acegilogin.jsp

📁 Java开发的权限管理的例子
💻 JSP
字号:
<%@ page contentType="text/html; charset=utf-8"%>
<%@ taglib prefix='c' uri='http://java.sun.com/jstl/core' %>
<%@ page import="org.acegisecurity.ui.AbstractProcessingFilter" %>
<%@ page import="org.acegisecurity.ui.webapp.AuthenticationProcessingFilter" %>
<%@ page import="org.acegisecurity.AuthenticationException" %>
<html>
<head>
<title>用户登陆</title>
<link rel="stylesheet" href="../css/default.css" type="text/css">
<script language="javascript">
	function check(){
		if(login.adminName.value==""){
			alert("请输入姓名");
			return false;
		}
		if(login.adminName.value.length>20){
			alert("姓名不超过20位");
			return false;
		}
		if(login.adminPasswd.value==""){
			alert("请输入密码");
			return false;
		}
		if(login.adminPasswd.value.length>20){
			alert("密码不超过20位");
			return false;
		}
		if(login.adminPasswd.value.length<6){
			alert("密码不少于6位");
			return false;
		}
		return true;
	}
</script>
</head>
<body leftMargin=0  topMargin=0 marginheight="0" marginwidth="0">
<br>
<br>
	<center>
     <%-- this form-login-page form is also used as the 
         form-error-page to ask for a login again.
         --%>
    <c:if test="${not empty param.login_error}">
      <font color="red">
        Your login attempt was not successful, try again.<BR><BR>
        Reason: <%= ((AuthenticationException) session.getAttribute(AbstractProcessingFilter.ACEGI_SECURITY_LAST_EXCEPTION_KEY)).getMessage() %>
      </font>
    </c:if>
    </center>
<br>
<br>
<div align="center">
<center>
<table align=center border=0 cellPadding=0 cellSpacing=0 width=500>
	<tr>
		<td width=134 height=37><IMG height=37 src="../images/top_left.gif"
			width=134></td>
		<td width="100%" background=../images/top_middle.gif height=37
			valign="middle">
		<p align="center">
		</td>
		<td width=49 height=37><IMG height=37 src="../images/top_right.gif"
			width=49></td>
	</tr>
</table>
</center>
</div>
<div align=center>
<center>

<table border=0 cellPadding=0 cellSpacing=0 width=500 height=113
	bordercolor="#111111">
	<tr>
		<td width=11 background="../images/middle_left.gif" height=113></td>
		<td width=478 align="center" height=21>
		<table width="200" border="0" cellspacing="0" cellpadding="0">
			<tr></tr>
			<tr>
				<td><FONT color="#ff0000"> &nbsp; </FONT></td>
			</tr>
		</table>
		<table border="0" cellpadding="0" cellspacing="0"
			bordercolor="#111111" width=280 height=107>
			<tr>
				<td width="100%" height=107 align="center" valign="top">
				<table border="1" cellpadding="0" cellspacing="0"
					bordercolor="#99bb99" width="100%" height="30"
					style="BORDER-COLLAPSE: collapse">
					<tr>
						<td width="100%" height=30 background="../images/note_bg.gif">
						<p align="center"><strong>用户登陆</strong>
						</td>
					</tr>
				</table>
				<table border="1" cellpadding="0" cellspacing="0"
					bordercolor="#99bb99" width="100%" height="92"
					style="BORDER-COLLAPSE: collapse">
					<form action="<c:url value='j_acegi_security_check'/>" method="POST">
						<tr>
							<td width=100 height=30>
							<p align="center">用户名:
							</td>
								<td width=180 height=30 align="center"><input type='text' name='j_username' <c:if test="${not empty param.login_error}">value='<%= session.getAttribute(AuthenticationProcessingFilter.ACEGI_SECURITY_LAST_USERNAME_KEY) %>'</c:if>></td>
						</tr>
						<tr>
							<td width=100 height=30>
							<p align="center">密码:
							</td>
							<td width=180 height=30 align="center"><input type='password' name='j_password'></td>
						</tr>
						<tr><td><input type="checkbox" name="_acegi_security_remember_me"></td><td>Don't ask for my password for two weeks</td></tr>
						<tr>
							<td width="100%" height=32 colspan=2>
							<table width="301" border="0" cellspacing="0" cellpadding="0">
								<tr>
									<td>
									<div align="center"><input name="确定" type="submit"></div>
									</td>
									<td>
									<div align="center"><input name="取消" type="reset"></div>
									</td>
								</tr>
							</table>
							</td>
						</tr>
					</form>
				</table>
				</td>
			</tr>
		</table>
		<br>
		</td>
		<td width=11 background="../images/middle_left.gif" height=113></td>
	</tr>
</table>
</center>
</div>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" bordercolor="#111111"
	width=500>
	<tr>
		<td width="133" height="72"><IMG height="72"
			src="../images/bottom_left.gif" width="133"></td>
		<TD width="100%" background=../images/bottom_middle.gif height=72><span>HeWQ.
		All Rights Reserved.</span></TD>
		<td width="22" height="72"><IMG height="72"
			src="../images/bottom_right.gif" width="22"></td>
	</tr>
</table>
</center>
</div>
</body>
</html>

⌨️ 快捷键说明

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