📄 left.jsp
字号:
<%@ taglib prefix="c" uri="/WEB-INF/c.tld"%>
<%@ page isELIgnored="false" language="java" import="java.util.*"
pageEncoding="gbk"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'left.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<style type="text/css">
<!--
.STYLE2 {font-size: 10px}
.STYLE3 {font-size: 12px}
-->
</style>
</head>
<body>
<br>
<img src="image/qiantai/left.jpg" width="122" height="96">
<br>
<form name="form1" method="post" action="User">
<table width="295" border="1" height="155">
<tr>
<td width="70">
用户名
<td width="209">
<label>
<%
Cookie cookies = null;
String existUserName = null;
Cookie[] existCookies = request.getCookies();
if (existCookies != null) {
for (int i = 0; i < existCookies.length; i++) {
cookies = existCookies[i];
if (cookies.getName() != null) {
// System.out.println(cookies.getName());
String a = cookies.getName();
if (a.equals("cookieusername")) {
existUserName = cookies.getValue();
session
.setAttribute("existUserName",
existUserName);
System.out.println("存在的用户名:" + existUserName);
pageContext.setAttribute("existUserName",existUserName);
}
}
}
}
%>
<input name="txtUserName" type="text" id="txtUserName"
value="${existUserName }">
<br>
<a href="UserReg.jsp" target="showFrame">申请注册 </a>
</label>
<label>
<span class="STYLE3">|</span>
<input name="checkusername" type="checkbox" id="checkusername"
value="1">
<span class="STYLE3">记住帐号</span>
</label>
</td>
</tr>
<tr>
<td>
密码:
</td>
<td>
<label>
<input name="txtPassword" type="password" id="txtPassword">
<br>
<a href="BackPwd.jsp" target="showFrame">找回密码</a>
</label>
</td>
</tr>
<tr>
<td>
权限:
</td>
<td>
<label>
<input name="radiobutton" type="radio" value="1" checked>
</label>
<span class="STYLE2">管理员</span>
<label>
<input type="radio" name="radiobutton" value="3">
<span class="STYLE2">普通用户</span>
</label>
</td>
</tr>
<tr>
<td>
<label>
<input type="reset" name="Reset" value="重置">
</label>
</td>
<td>
<label>
<input type="submit" name="Submit" value="提交">
</label>
</td>
</tr>
</table>
</form>
状态:
<br>
<c:choose>
<c:when test="${sessionScope.isLoginSuccess}">
<h2>
<font color="red">您已经已登陆</font>
</h2>
</c:when>
<c:when test="${sessionScope.isLoginSuccess==null}">
<h2>
<font color="red">还未登陆</font>
</h2>
</c:when>
<c:when test="${sessionScope.isLoginSuccess==false}">
<h2>
<font color="red">登陆失败</font>
</h2>
</c:when>
<c:otherwise>
<h2>
<font color="red">还未登陆</font>
</h2>
</c:otherwise>
</c:choose>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -