struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stan77 <m...@stansworld.de>
Subject Re: Problem with internationalization in addActionError
Date Sun, 20 Apr 2008 19:34:55 GMT

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: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Problem-with-internationalization-in-addActionError-tp16790683p16797626.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


Mime
View raw message