You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by setecastronomy <fi...@virgilio.it> on 2007/10/02 13:17:14 UTC

[S2] formatting informations in properties files

In my jsp pages I often need to limit the number of decimals and I learnt how
to create a properties file with the same name of the action and  use the
s:text tag:

<s:text name="un.decimale"><s:param value="%{value *
#sensore.scale}"/></s:text>

I ended up with many properties files which have most the same formatting
informations.
I wonder if there is a smarter and centralized way to store the formatting
informations used in different jsp pages associated to different actions.

Thanks
Filippo

-- 
View this message in context: http://www.nabble.com/-S2--formatting-informations-in-properties-files-tf4554313.html#a12996857
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


Re: [S2] formatting informations in properties files

Posted by Chris Pratt <th...@gmail.com>.
On 10/2/07, setecastronomy <fi...@virgilio.it> wrote:
> I wonder if there is a smarter and centralized way to store the formatting
> informations used in different jsp pages associated to different actions.
>

I believe you can either do it at the package level using something like:

com/mycompany/mypackage/package.properties

Or you can set the struts.custom.i18n.resources constant in your
struts.xml file (or as a property in your struts.properties file) to
an application wide resource:

<constant name="struts.custom.i18n.resources" value="application"/>

would make the application.properties file, located on the classpath,
an application wide resource.

  (*Chris*)

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