📄 login.jsp
字号:
<%@ page contentType="text/html; charset=gb2312" pageEncoding="gb2312"%>
<%@ page import ="entity.*" %>
<%@ page import ="service.*" %>
<%@ page import ="java.util.List" %>
<%
Action action=new Action();
String strUserName=Util.sqlCheck(request.getParameter("strUserName"));
String strPassword=Util.sqlCheck(request.getParameter("strPassword"));
if(strUserName.length()>0 && strPassword.length()>0){
List list=action.doLogin(strUserName,strPassword);
if (null!=list){
session.setAttribute("AllPermissions",list);
response.sendRedirect("main.jsp");
}
else{
%>
<script language="JavaScript">alert("用户密码错误!");</script>
<%
}
}
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>登陆</title>
</head>
<body>
<form name="form1" method="post" action="">
<table width="100%" border="1" cellpadding="0" cellspacing="0" bgcolor="#DFDFDF">
<tr>
<td height="25"><div align="right">用户名:</div></td>
<td><input name="strUserName" type="text" id="strUserName"></td>
</tr>
<tr>
<td height="25"><div align="right">密码:</div></td>
<td><input name="strPassword" type="password" id="strPassword"></td>
</tr>
<tr>
<td height="25"> </td>
<td><input type="submit" name="Submit" value="提交"> <input type="reset" name="Submit2" value="重置"></td>
</tr>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -