SEC-256: Contacts sample not displaying localized exceptions correctly.

This commit is contained in:
Ben Alex 2006-04-28 06:43:50 +00:00
parent bff37bc4ce
commit 21aaf2b9db
2 changed files with 14 additions and 4 deletions

View File

@ -1,4 +1,4 @@
/* Copyright 2004, 2005 Acegi Technology Pty Limited
/* Copyright 2004, 2005, 2006 Acegi Technology Pty Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -23,12 +23,15 @@ import org.springframework.context.support.ResourceBundleMessageSource;
* The default <code>MessageSource</code> used by Acegi Security.
*
* <p>
* All Acegi Security classes requiring messge localization will be default use
* All Acegi Security classes requiring messge localization will by default use
* this class. However, all such classes will also implement
* <code>MessageSourceAware</code> so that the application context can inject
* an alternative message source. Therefore this class is only used when the
* deployment environment has not specified an alternative message source.
* </p>
*
* @author Ben Alex
* @version $Id$
*/
public class AcegiMessageSource extends ResourceBundleMessageSource {
//~ Constructors ===========================================================
@ -36,8 +39,10 @@ public class AcegiMessageSource extends ResourceBundleMessageSource {
public AcegiMessageSource() {
setBasename("org.acegisecurity.messages");
}
//~ Methods ================================================================
public static MessageSourceAccessor getAccessor() {
return new MessageSourceAccessor(new AcegiMessageSource());
return new MessageSourceAccessor(new AcegiMessageSource());
}
}

View File

@ -149,6 +149,11 @@
<bean id="exceptionTranslationFilter" class="org.acegisecurity.ui.ExceptionTranslationFilter">
<property name="authenticationEntryPoint"><ref local="authenticationProcessingFilterEntryPoint"/></property>
<property name="accessDeniedHandler">
<bean class="org.acegisecurity.ui.AccessDeniedHandlerImpl">
<property name="errorPage" value="/accessDenied.jsp"/>
</bean>
</property>
</bean>
<bean id="authenticationProcessingFilter" class="org.acegisecurity.ui.webapp.AuthenticationProcessingFilter">