You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Dean Pullen <de...@msp-uk.com> on 2007/11/15 13:09:44 UTC

getText returning message key

Hi all,

 

Having a perculiar problem regarding getText() in an action.

 

It seems to be returning the key, not its value, even though the key
exists.

(Which is odd, as the javadocs say getText returns null if key not
found).

 

The action is a login action, not sure if that makes any difference, but
it shouldn't, everything else works fine except getText.

 

Cheers,

 

Dean.

 


Re: getText returning message key

Posted by Zarar Siddiqi <za...@gmail.com>.
Make sure that you have a property called struts.custom.i18n.resources
defined in struts.properties which refers to the resource bundles that
you're using.  For example:

struts.custom.i18n.resources=resource1,resource2

The above would look for resource bundles called resource1.properties
and resource2.properties at the root of your classpath.

Zarar


On Nov 15, 2007 7:09 AM, Dean Pullen <de...@msp-uk.com> wrote:
> Hi all,
>
>
>
> Having a perculiar problem regarding getText() in an action.
>
>
>
> It seems to be returning the key, not its value, even though the key
> exists.
>
> (Which is odd, as the javadocs say getText returns null if key not
> found).
>
>
>
> The action is a login action, not sure if that makes any difference, but
> it shouldn't, everything else works fine except getText.
>
>
>
> Cheers,
>
>
>
> Dean.
>
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org