You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Emi Lu <em...@encs.concordia.ca> on 2010/01/20 16:12:40 UTC
getText() from login.properties but not packages.properties
Good morning,
I created login.properties that contains "username.required=Username
cannot be empty."
If I rename this file to packages.properties, the system always return
the text message, but if the name is not that, the message never returned.
May I know if I want struts2 read login.properties:
(1) where should the login.properties saved?
(2) Do I need any setup in strut.xml or web.xml to
getText("username.required") from login.properties?
Thanks a lot!
--
Lu Ying
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: getText() from login.properties but not packages.properties
Posted by Bhaarat Sharma <bh...@gmail.com>.
login.properties has to be mentioned in you struts.properties file as
struts.custom.i18n.resources=login
Above means that login.properties resides in WEB-INF/classes
On Wed, Jan 20, 2010 at 1:47 PM, Emi Lu <em...@encs.concordia.ca> wrote:
> Lukasz Lenart wrote:
>
>> Please read documentation, everything is explained there.
>>
>> http://struts.apache.org/2.1.8.1/docs/localization.html
>> http://struts.apache.org/2.1.8.1/docs/strutsproperties.html
>>
>> This did not answer my question :(
>
> Using package.properties works fine for me. The problem is how to read
> value from login.properties file?
>
> How does struts2 recognize login.properties?
>
> Thanks
> --
> Lu Ying
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
Re: getText() from login.properties but not packages.properties
Posted by Emi Lu <em...@encs.concordia.ca>.
Lukasz Lenart wrote:
> Please read documentation, everything is explained there.
>
> http://struts.apache.org/2.1.8.1/docs/localization.html
> http://struts.apache.org/2.1.8.1/docs/strutsproperties.html
>
This did not answer my question :(
Using package.properties works fine for me. The problem is how to read
value from login.properties file?
How does struts2 recognize login.properties?
Thanks
--
Lu Ying
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: getText() from login.properties but not packages.properties
Posted by Lukasz Lenart <lu...@googlemail.com>.
Please read documentation, everything is explained there.
http://struts.apache.org/2.1.8.1/docs/localization.html
http://struts.apache.org/2.1.8.1/docs/strutsproperties.html
Regards
--
Lukasz
KapituĊa Javarsovia 2010
http://javarsovia.pl
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org