spring security 3.0.3自定义登录表单

时间:2010-07-06 14:31:15

标签: spring-security

This handy link显示了如何创建一个替换2.5.6中内置spring安全登录表单的表单。任何人都可以阐明3.0.3的相应问题吗?有些东西发生了变化,旧的形式不起作用。

当我点击提交时,它返回到带有错误标志的登录页面,用户名从我输入的内容变为'null'。

这表明所需表单字段的名称已从j_username和j_password更改为其他字段。

我也怀疑

<input type="text" name="j_username" id="j_username"
    <c:if test="${not empty param.login_error}">value='<%= 
 session.getAttribute(AuthenticationProcessingFilter.SPRING_SECURITY_LAST_USERNAME_KEY) %>'
 </c:if> />

因为不推荐使用AuthenticationProcessingFilter。

答案是: POST 现在是必需的。我希望它第一次产生错误信息。

0 个答案:

没有答案
相关问题