struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: Problem with internationalization in addActionError
Date Mon, 21 Apr 2008 07:43:52 GMT
Hi Stan,

mostly it's just a little mistake, that makes you crazy ....
Did you make sure that the key in the properties_en-file is existent and properly written
(error.login.failed) ?
I am using the same mechanism an it works without any trouble. Can only be a stupid mistake.

If you are using eclipse, try to find out if your java-classes are compiled. (Just delete
the .class file and compile).
Had that problem yesterday. (Just an idea ;)   )

Hi Volker,

my Action class implements ServletRequestAware. When I check the locale with
request.getParameter("request_locale"), I get 'en' as result.

The both *.properties files are in the same classpath. 
If the logon is invalid I put the actionError and return LOGIN
and go back to Logon.jsp.

My action definition: 
<action name="doLogon" class="">
<result name="input">/Logon.jsp</result>
<result name="error">/Logon.jsp</result>
<result name="login">/Logon.jsp</result>	
<result name="success" type="redirect-action">

After the action, the Logon.jsp is displayed with all contents in english
excepting the action Error and the hole login form,
including labels, buttons etc. wich seems to get his content from

All menu items, another form and anything else is displayed from the
I don't why, because both files are at the same position.

Volker Karlmeier wrote:
> Hash: SHA1
> Hi,
>     you should try to find out, what the acutal locale is and if there
> is a suitable properties-file.
>     Next, try to find out, if your properties-file is found in the
> right position. (Package etc.) and if it
>     is accessible.
>     Maybe you have not extended RequestAware in your class.....
> Volker
> stan77 schrieb:
>> Hello,
>> I'm new to struts 2.
>> I have the following problem with internationalization in my Action
> classes.
>> there are two properties files and
>> wich works correctly in most cases.
>> In my Logon action i would like to add an Action error like this:
>> addActionError(getText("error.login.failed"));
>> The message is dispayed in my jsp, but always get it's string from
>> never from Seems, that the request_locale is not
>> reachable in my
>> Action class.
>> I've searched a several days for a solution, but can't find anything.
>> Thanks for help.
> Version: GnuPG v1.4.3 (MingW32)
> Comment: Using GnuPG with Mozilla -
> iD8DBQFICzpUx4KjH6Tk4MMRApIbAKC4pKdtpGstmMYb5F7mr/SU2AdHqgCfRtQR
> UKbnP14prumG73NvVAQBy7w=
> =2ETC
> ---------------------------------------------------------------------
> 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:

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

View raw message