JavaConfiguration for Spring 4.0 + Security 3.2 + j_spring_security_check [英] JavaConfiguration for Spring 4.0 + Security 3.2 + j_spring_security_check
本文介绍了JavaConfiguration for Spring 4.0 + Security 3.2 + j_spring_security_check的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
创建登录页面
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %><!DOCTYPE html><头><meta charset="ISO-8859-1"><title>测试</title><script src="static/js/jquery-1.10.2.min.js"></script><script src="static/js/app-controller.js"></script>头部><身体><div>登录</div><form name="f" action="<c:url value="/j_spring_security_check"/>"方法=POST"><label for="password">用户名</label><input type="text" id="j_username" name="j_username"><br/><label for="password">密码</label><input type="password" id="j_password" name="j_password"><br/><input type="submit" value="Validate"><input name="reset" type="reset"><input type="hidden" id="${_csrf.parameterName}" name="${_csrf.parameterName}" value="${_csrf.token}"/></表单><小时/><c:if test="${param.error != null}"><div>登录失败.<c:if test="${SPRING_SECURITY_LAST_EXCEPTION != null}">原因:<c:out value="${SPRING_SECURITY_LAST_EXCEPTION.message}"/></c:if>
</c:if><小时/><input type="button" value="Echo" id="echo" name="echo" onclick="AppController.echo();"><div id="echoContainer"></div>