Spring 2.5、asegiセキュリティ1.0.7の私のプロジェクトのログインメカニズムを開発しました。私は開発サーバーとしてTomcat 6を使用しました。すべて正常に動作し、正常にログインできました。プロダクションサーバーにアプリケーションをデプロイしたときに問題が発生しました。プロダクトをtomcat 6にデプロイした瞬間から、正しいユーザー名とパスワードでもログインできませんでした。すべての中で最も奇妙なのは例外がスローされないということです。私はちょうどログインできません!ここ は、アプリケーションのアプリケーションのcontext.xmlです:?!正しいユーザー名/パスワードでもSpring 2.5のログインが応答しない
<bean id="authedicationProvider" class="org.acegisecurity.providers.dao.DaoAuthenticationProvider">
<property name="userDetailsService" ref="userDetailService"/>
</bean>
<bean id="authenticationEntryPoint" class="org.acegisecurity.ui.webapp.AuthenticationProcessingFilterEntryPoint">
<property name="loginFormUrl" value="/login.htm" />
</bean>
<bean id="filterChainProxy"
class="org.acegisecurity.util.FilterChainProxy">
<property name="filterInvocationDefinitionSource">
<value>
CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
PATTERN_TYPE_APACHE_ANT
/**=authenticationProcessingFilter,exceptionTranslationFilter
</value>
</property>
</bean>
<bean id="authenticationProcessingFilter"
class="org.acegisecurity.ui.webapp.AuthenticationProcessingFilter">
<property name="authenticationManager" ref="authenticationManager"/>
<property name="authenticationFailureUrl" value="/error.htm" />
<property name="defaultTargetUrl" value="/admin_menu.htm" />
<property name="filterProcessesUrl" value="/j_acegi_security_check" />
</bean>
<bean id="roleVoter" class="org.acegisecurity.vote.RoleVoter"/>
<bean id="accessDecisionManager" class="org.acegisecurity.vote.UnanimousBased">
<property name="decisionVoters">
<list>
<ref bean="roleVoter"/>
</list>
</property>
<property name="allowIfAllAbstainDecisions" value="true"/>
</bean>
<bean id="filterSecurityInterceptor" class="org.acegisecurity.intercept.web.FilterSecurityInterceptor">
<property name="authenticationManager" ref="authenticationManager"/>
<property name="accessDecisionManager" ref="accessDecisionManager"/>
<property name="objectDefinitionSource">
<value>
CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
PATTERN_TYPE_APACHE_ANT
/add_article.htm=ROLE_ADMIN
/add_publication.htm=ROLE_ADMIN
/admin_menu.htm=ROLE_ADMIN
</value>
</bean>
</property>
</bean>
<bean id="authenticationManager" class="org.acegisecurity.providers.ProviderManager">
<property name="providers">
<list>
<ref bean="authedicationProvider"/>
</list>
</property>
</bean>
<bean id="userDetailService" class="org.acegisecurity.userdetails.jdbc.JdbcDaoImpl">
<property name="dataSource" ref="datasource"/>
<property name="usersByUsernameQuery">
<value>
SELECT username,password,'true' AS enabled FROM Users where username=?
</value>
</property>
<property name="authoritiesByUsernameQuery">
<value>
SELECT username,role_name FROM Roles r,Users u WHERE r.user=u.id AND u.username=?
</value>
</property>
</bean>
私は気にいらをしないのですすべてのヘルプは本当にいただければ幸い事前
@kafrlustログインしているユーザーはROLE_ADMINを持っていますか? defaultTargetUrlはこのAuthorityを必要とするページです。また、acegiのログレベルをDEBUG – Raghuram
に設定すると、より多くの情報を取得できます。はい、ログインしたユーザーはROLE_ADMINです!私は何も変更していないのに、開発サーバーがうまく動作していて、ライブサーバーにいないときは非常に奇妙です! – kafrlust
ログインHTTPリクエストがアプリケーションに届いていますか、またはサーバーによってブロックされていますか? – Ralph