Hi Volker,
thanks for your replies, i solved my problem today.
It was really a stupid mistake:
I had an other package.properties one package above, where
the entries for the Logon form were registered too.
Thanks for help anyway.
Volker Karlmeier wrote:
>
> 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="com.imp.app.usr.Logon">
> <result name="input">/Logon.jsp</result>
> <result name="error">/Logon.jsp</result>
> <result name="login">/Logon.jsp</result>
> <result name="success" type="redirect-action">
> Welcome
> </result>
> </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
> package.properties.
>
> All menu items, another form and anything else is displayed from the
> package_en.properties.
> I don't why, because both files are at the same position.
>
>
>
>
> Volker Karlmeier wrote:
>>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> 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 package.properties and
>>> package_en.properties
>>> 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
>>> package.properties,
>>> never from package_en.properties. 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.
>>
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v1.4.3 (MingW32)
>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>>
>> iD8DBQFICzpUx4KjH6Tk4MMRApIbAKC4pKdtpGstmMYb5F7mr/SU2AdHqgCfRtQR
>> UKbnP14prumG73NvVAQBy7w=
>> =2ETC
>> -----END PGP SIGNATURE-----
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>
> --
> View this message in context:
> http://www.nabble.com/Problem-with-internationalization-in-addActionError-tp1679
> 0683p16797626.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
--
View this message in context:
http://www.nabble.com/Problem-with-internationalization-in-addActionError-tp16790683p16811439.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]