Created
May 30, 2017 03:23
-
-
Save LuckyKoala/5c5508375710bc2f506d9978566d24be to your computer and use it in GitHub Desktop.
Simple jsp for user login
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@ page contentType="text/html;charset=UTF-8" language="java" %> | |
<jsp:useBean id="loginBean" class="javabean.LoginBean" scope="session"/> | |
当前用户: <%= loginBean.getUname() %>[UUID: <%= loginBean.getUuid() %>] | |
最近一次登录状态: <%= session.getAttribute("loginMessage") %> | |
<% | |
if(loginBean.getHasLogin()) { | |
%> | |
<a href="login?loginOperator=LOGOUT&srcPage=<%= request.getParameter("srcPage") %>">注销</a> | |
<% | |
} else { | |
%> | |
<form action="login" name="loginForm" method="post"> | |
<input type="hidden" name="srcPage" value="<%= request.getParameter("srcPage") %>"> | |
<input type="hidden" name="loginOperator" value="LOGIN"> | |
用户名: <input type="text" name="userName"> | |
密码: <input type="password" name="password"> | |
<input type="submit" value="登录"> | |
</form> | |
<% | |
} | |
%> | |
<hr> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment