<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<h3>Login with Username and Password</h3>
<form name='f' action='<spring:url value="/j_spring_security_check" />' method='POST'>
<table>
<tr><td>User:</td><td><input type='text' name='j_username' value=''></td></tr>
<tr><td>Password:</td><td><input type='password' name='j_password'/></td></tr>
<tr><td colspan='2'><input name="submit" type="submit" value="Login"/></td></tr>
</table>
</form>
</body>
</html>
Spring Security登录表单
最新推荐文章于 2025-12-11 10:50:41 发布
本文提供了一个使用Spring框架实现的安全登录页面示例代码。该页面包含用户名与密码输入框,并通过POST方法提交到/j_spring_security_check路径进行身份验证。
7016

被折叠的 条评论
为什么被折叠?



