📄 login.jsp
字号:
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
String message=request.getParameter("message");
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'login.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">
-->
</head>
<body>
<form method="post" name="login" action="<%=path+"/user/login" %>">
<p>
</p>
<table width="300" border="0" align="center">
<tbody>
<tr align="center">
<td>
<font color=green size=5>用户登录</font>
</td>
</tr>
<tr>
<td>
<table width="300" border="0" align="center" height="73">
<tbody>
<tr>
<td>
用户名称:
</td>
<td>
<input type="text" name="username">
</td>
</tr>
<tr>
<td>
用户密码:
</td>
<td>
<input type="password" name="userpassword" size="22">
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr align="center">
<td>
<input type="submit" value="登录" name="submit">
<input type="reset" value="重置" name="reset">
</td>
</tr>
<tr>
<td valign="top"><div align="center">
<%
if(message!=null)
{
%>
<font color="red">登录失败,请重新登录</font></div>
<%} %>
</td>
</tr>
</tbody>
</table>
<p>
</p>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -