Apr 18th, 2007, 09:57 PM
In my applicationContext.xml, I defined
then, I defined AbstractUserDetailsAuthenticationProvider.locked=U ser account is locked(test) in messages.properties and AbstractUserDetailsAuthenticationProvider.locked=用 户被锁定 in messages_zh_CN.properties
In my UserDetailsService implementation, isAccountNonLocked() function will return false. So in my login jsp,
<%= ((AuthenticationException) session.getAttribute(AbstractProcessingFilter.ACEG I_SECURITY_LAST_EXCEPTION_KEY)).getMessage() %>
will print out "User account is locked(test)". It seems I could use my properties replace default message. But When I change my firefox default language into zh-CN, it still returned English message.
So I think acegi does not use spring MVC, when I sumbit form to j_acegi_security_check, acegi could not use default spring AcceptHeaderLocaleResolver to set Locale. It will always get tomcat default-locale.
Could you give me some suggestion? How could I make j_acegi_security_check to support Locale?
Thanks a lot.
Apr 19th, 2007, 06:53 AM
Do a search for locale on the acegi forum, there are lots of answers to might help.
Apr 19th, 2007, 01:38 PM
Thanks for your reply. I found the following topic, which could solve my problem.
Apr 19th, 2007, 01:47 PM
Glad you found a helpful solution. There have been lots of posts on the forum, it's always a good idea to do a search.