这是我的带有用户名/密码和 openid 登录表单的干净 html 文本项目中的示例。
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body style="width: 100%; height: 100%">
<div style="width: 100%; vertical-align: middle; height: 100%; border: 1px solid red" align="center">
<form style="border: 1px solid red" action="../j_spring_security_check" method="post">
<p>
<label for="j_username">Username</label> <input id="j_username" name="j_username" type="text" />
</p>
<p>
<label for="j_password">Password</label> <input id="j_password" name="j_password" type="password" />
</p>
<input type="submit" value="Login" />
</form>
<form action="../j_spring_openid_security_check" method="post">
For Google users: <input name="openid_identifier" type="hidden" value="https://www.google.com/accounts/o8/id" /> <input type="submit" value="Sign with Google" />
</form>
</div>
</body>
</html>
您必须更改代码
<action="../j_spring_security_check">