MyException - 我的异常网
当前位置:我的异常网» J2EE » 为什么小弟我基于 Acegi 的登陆没反应

为什么小弟我基于 Acegi 的登陆没反应(2)

www.MyException.Cn  网友分享于:2013-12-13  浏览:236次

尝试登陆之后好像没什么反应,并没有任何异常,但仍然返回登陆页面, Console 打印的信息如下:  
2008-01-01 14:23:34,093 DEBUG [PathBasedFilterInvocationDefinitionMap.java:100] - Converted URL to lowercase, from: '/j_acegi_security_check'; to: '/j_acegi_security_check'  
2008-01-01 14:23:34,093 DEBUG [PathBasedFilterInvocationDefinitionMap.java:112] - Candidate is: '/j_acegi_security_check'; pattern is /** ; matched=true  
2008-01-01 14:23:34,093 DEBUG [AbstractBeanFactory.java:203] - Returning cached instance of singleton bean 'authenticationProcessingFilter'  
2008-01-01 14:23:34,109 DEBUG [AbstractBeanFactory.java:203] - Returning cached instance of singleton bean 'exceptionTranslationFilter'  
2008-01-01 14:23:34,109 DEBUG [AbstractBeanFactory.java:203] - Returning cached instance of singleton bean 'filterSecurityInterceptor'  
2008-01-01 14:23:34,109 DEBUG [FilterChainProxy.java:270] - /j_acegi_security_check at position 1 of 3 in additional filter chain; firing Filter: 'org.acegisecurity.ui.webapp.AuthenticationProcessingFilter@7ee46a'  
2008-01-01 14:23:34,109 DEBUG [FilterChainProxy.java:270] - /j_acegi_security_check at position 2 of 3 in additional filter chain; firing Filter: 'org.acegisecurity.ui.ExceptionTranslationFilter@c62c07'  
2008-01-01 14:23:34,109 DEBUG [FilterChainProxy.java:270] - /j_acegi_security_check at position 3 of 3 in additional filter chain; firing Filter: 'org.acegisecurity.intercept.web.FilterSecurityInterceptor@749ebc'  
2008-01-01 14:23:34,109 DEBUG [PathBasedFilterInvocationDefinitionMap.java:100] - Converted URL to lowercase, from: '/j_acegi_security_check'; to: '/j_acegi_security_check'  
2008-01-01 14:23:34,109 DEBUG [PathBasedFilterInvocationDefinitionMap.java:112] - Candidate is: '/j_acegi_security_check'; pattern is /admin/** ; matched=false  
2008-01-01 14:23:34,109 DEBUG [AbstractSecurityInterceptor.java:247] - Public object - authentication not attempted  
2008-01-01 14:23:34,140 DEBUG [AbstractApplicationContext.java:244] - Publishing event in context [org.springframework.web.context.support.XmlWebApplicationContext@e0f0ad]: org.acegisecurity.event.authorization.PublicInvocationEvent[source=FilterInvocation: URL: /j_acegi_security_check]  
2008-01-01 14:23:34,140 DEBUG [FilterChainProxy.java:261] - /j_acegi_security_check reached end of additional filter chain; proceeding with original chain  
2008-01-01 14:23:34,140 DEBUG [ExceptionTranslationFilter.java:113] - Chain processed normally  
这是什么原因造成的呢?

------解决方案--------------------
你的配置文件中有两处将跳回到登录界面:
<property name="authenticationFailureUrl" value="/login.html" />

<property name="loginFormUrl" value="/login.html" />

最好把你的异常得到才能知道为什么无法登陆。你可以参考以下示例:

HTML code
<c:if test="${not empty param.login_error}"> <font color="red"> 登录失败, 再试一次.<BR><BR> 原因:<%= ((AuthenticationException) session.getAttribute(AbstractProcessingFilter.ACEGI_SECURITY_LAST_EXCEPTION_KEY)).getMessage() %> </font> </c:if>

文章评论

软件开发程序错误异常ExceptionCopyright © 2009-2015 MyException 版权所有