struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grish <>
Subject Re: Using il8n text in an interceptor
Date Tue, 12 Feb 2008 09:22:02 GMT

Thanks for the suggestion! I tried integrating it to my code but the problem
is findDefaultText always returns null. I traced the name and the locale
that I am passing and they are correct. 

my is in my package. My
interceptor is in the package. Would the location
of the property file be the problem? 

I read the API and I had the impression that if I moved up the properties up
one level the properties file will still be seen. 

I tried moving it to package  but i still seem to be getting
null. Is there something wrong with my setup perhaps?

Pablo Vazquez wrote:
> // For future i18n purpose
>      private String translate(String name) {
>          String i18Name = LocalizedTextUtil.findDefaultText(name, locale);
>          if (i18Name == null) {
>              i18Name = name;
>          }
>          return i18Name;
>      }
> Grish escribió:
>> I'm studying how interceptors work and made a login interceptor based on
>> Mark
>> Menard's great tutorial:
>> I managed to integrate the interceptor in my sample application but I
>> want
>> to access my resource bundle for the localized error message. Is there a
>> method similar to the getText method for Interceptors? What would be  the
>> best approach for adding localized action error messages from an
>> interceptor?
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

View this message in context:
Sent from the Struts - User mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message