the ExceptionTranslationFilter is live for the filterInvocationInterceptor ,in my opinion.it will catch the exception from filterInvocationInterceptor then redrect the request to the defined url
[code]
<bean id="exceptionTranslationFilter"
class="org.acegisecurity.ui.ExceptionTranslationFilter">
<property name="authenticationEntryPoint">
<bean
class="org.acegisecurity.ui.webapp.AuthenticationProcessingFilterEntryPoint">
<property name="loginFormUrl" value="/acegilogin.jsp"/>
<property name="forceHttps" value="false"/>
</bean>
</property>
<property name="accessDeniedHandler">
<bean
class="org.acegisecurity.ui.AccessDeniedHandlerImpl">
<property name="errorPage" value="/accessDenied.jsp"/>
</bean>
</property>
</bean>
[/code]
accessDeniedHandler solves the AccessDeniedException and
authenticationEntryPoint solves any other exceptions.
[code]
<bean id="exceptionTranslationFilter"
class="org.acegisecurity.ui.ExceptionTranslationFilter">
<property name="authenticationEntryPoint">
<bean
class="org.acegisecurity.ui.webapp.AuthenticationProcessingFilterEntryPoint">
<property name="loginFormUrl" value="/acegilogin.jsp"/>
<property name="forceHttps" value="false"/>
</bean>
</property>
<property name="accessDeniedHandler">
<bean
class="org.acegisecurity.ui.AccessDeniedHandlerImpl">
<property name="errorPage" value="/accessDenied.jsp"/>
</bean>
</property>
</bean>
[/code]
accessDeniedHandler solves the AccessDeniedException and
authenticationEntryPoint solves any other exceptions.
本文介绍了一个配置Acegi Security中的异常翻译过滤器的方法。此过滤器能够捕获来自FilterInvocationInterceptor的异常,并将请求重定向到预定义的URL。AccessDeniedHandler处理AccessDeniedException异常,而AuthenticationEntryPoint则处理其他类型的异常。
4402

被折叠的 条评论
为什么被折叠?



