Init
This commit is contained in:
6
web/WEB-INF/web.xml
Normal file
6
web/WEB-INF/web.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"
|
||||
version="4.0">
|
||||
</web-app>
|
16
web/index.jsp
Normal file
16
web/index.jsp
Normal file
@@ -0,0 +1,16 @@
|
||||
<%--
|
||||
Created by IntelliJ IDEA.
|
||||
User: LDQ
|
||||
Date: 2023/6/6
|
||||
Time: 22:11
|
||||
To change this template use File | Settings | File Templates.
|
||||
--%>
|
||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||
<html>
|
||||
<head>
|
||||
<title>$Title$</title>
|
||||
</head>
|
||||
<body>
|
||||
${user.userName}
|
||||
</body>
|
||||
</html>
|
22
web/login.jsp
Normal file
22
web/login.jsp
Normal file
@@ -0,0 +1,22 @@
|
||||
<%--
|
||||
Created by IntelliJ IDEA.
|
||||
User: mayikt
|
||||
Date: 2022/6/6
|
||||
Time: 17:12
|
||||
To change this template use File | Settings | File Templates.
|
||||
--%>
|
||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>登录测试页面</title>
|
||||
<form action="/JavaWeb_Login_Register_war_exploded/login" method="post">
|
||||
<label>用户名: </label><input type="text" name="userName" value="${cookie.userName.value}"/><br>
|
||||
<label>密 码 : </label><input type="password" name="userPwd" value="${cookie.userPwd.value}"/><br>
|
||||
<label>记住密码: </label><input type="checkbox" name="rememberPassword"/><br>
|
||||
${errorMsg}
|
||||
<input type="submit" value="登录 "/>
|
||||
</form>
|
||||
|
||||
</head>
|
||||
</html>
|
41
web/register.jsp
Normal file
41
web/register.jsp
Normal file
@@ -0,0 +1,41 @@
|
||||
<%--
|
||||
Created by IntelliJ IDEA.
|
||||
User: mayikt
|
||||
Date: 2022/6/6
|
||||
Time: 17:12
|
||||
To change this template use File | Settings | File Templates.
|
||||
--%>
|
||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>注册页面</title>
|
||||
<form action="/JavaWeb_Login_Register_war_exploded/register" method="post">
|
||||
<label>用户名: </label><input type="text" name="userName"/><br>
|
||||
<label>密   码: </label><input type="password" name="userPwd"/><br>
|
||||
<label>验证码: </label><input type="text" name="code"/><img id="exchangecode" src="VerifycodeServlet">
|
||||
<a id="ecode" href="#">看不清?换一张图片</a><br>
|
||||
<span style="color: red">${errorMsg}</span>
|
||||
<input type="submit" value="注册"/>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
window.onload = function () {
|
||||
//获取img标签的对象
|
||||
img = document.getElementById("exchangecode");
|
||||
img.onclick = function () {
|
||||
//加时间戳,避免浏览器缓存
|
||||
var date = new Date().getTime()
|
||||
img.src = "VerifycodeServlet?" + date;
|
||||
}
|
||||
//获取a标签的对象
|
||||
ec = document.getElementById("ecode");
|
||||
ec.onclick = function () {
|
||||
//加时间戳
|
||||
var date = new Date().getTime()
|
||||
img.src = "VerifycodeServlet?" + date;
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
</html>
|
Reference in New Issue
Block a user