You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Jay Sheth <sh...@gmail.com> on 2005/08/08 18:07:05 UTC

retrieving message from application.resources file

Hi,
I need to read a property global.format.date = dd/mm/yyyy in a form
class (eg logonform.java) from application.properties file.

How do i do tht ?

thanks,
Jay

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


Re: retrieving message from application.resources file

Posted by Jay Sheth <sh...@gmail.com>.
thnks a lot. it worked !!!

Jay

On 8/8/05, Gareth Evans <ga...@msoft.co.uk> wrote:
>  From an Action class you can use:
> String dateFormat = getResources( request ).getMessage( "global.format.date" );
> 
> Or from anywhere else:
> String dateFormat = MessageResources.getMessageResources( "ApplicationResources" ).getMessage(
> "global.format.date" )
> 
> I'm not sure how well this works with struts modules?
> 
> Gareth
> 
> 
> Jay Sheth wrote:
> 
> > Hi,
> > I need to read a property global.format.date = dd/mm/yyyy in a form
> > class (eg logonform.java) from application.properties file.
> >
> > How do i do tht ?
> >
> > thanks,
> > Jay
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> 
> --
> Gareth Evans
> 
> MSoft eSolutions Limited
> Technology Centre
> Inward Way
> Rossmore Business Park
> Ellesmere Port
> Cheshire
> CH65 3EN
> 
> --
> Tel:    +44 (0)870 0100 704
> Fax:    +44 (0)870 9010 705
> E-Mail: gareth@msoft.co.uk
> Web:    www.msoft.co.uk
> 
> ----------------------------------------------
> Terms:
> Please note that any prices quoted within this e-mail are subject to VAT.
> All program details and code described in this e-mail are subject to
> copyright (c) of MSoft eSolutions Limited and remain the intellectual
> property of MSoft eSolutions Limited.
> Any proposal or pricing information contained within this e-mail are
> subject to MSoft eSolutions' Terms and Conditions
> ----------------------------------------------
> Disclaimer:
> This message is intended only for use of the addressee. If this message
> was sent to you in error, please notify the sender and delete this
> message. MSoft eSolutions Limited cannot accept responsibility for viruses,
> so please scan attachments. Views expressed in this message do not
> necessarily reflect those of MSoft eSolutions Limited who will not
> necessarily be bound by its contents.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
>

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


Re: retrieving message from application.resources file

Posted by Gareth Evans <ga...@msoft.co.uk>.
 From an Action class you can use:
String dateFormat = getResources( request ).getMessage( "global.format.date" );

Or from anywhere else:
String dateFormat = MessageResources.getMessageResources( "ApplicationResources" ).getMessage( 
"global.format.date" )

I'm not sure how well this works with struts modules?

Gareth


Jay Sheth wrote:

> Hi,
> I need to read a property global.format.date = dd/mm/yyyy in a form
> class (eg logonform.java) from application.properties file.
> 
> How do i do tht ?
> 
> thanks,
> Jay
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 

-- 
Gareth Evans

MSoft eSolutions Limited
Technology Centre
Inward Way
Rossmore Business Park
Ellesmere Port
Cheshire
CH65 3EN

-- 
Tel:    +44 (0)870 0100 704
Fax:    +44 (0)870 9010 705
E-Mail: gareth@msoft.co.uk
Web:    www.msoft.co.uk

----------------------------------------------
Terms:
Please note that any prices quoted within this e-mail are subject to VAT.
All program details and code described in this e-mail are subject to
copyright © of MSoft eSolutions Limited and remain the intellectual
property of MSoft eSolutions Limited.
Any proposal or pricing information contained within this e-mail are
subject to MSoft eSolutions' Terms and Conditions
----------------------------------------------
Disclaimer:
This message is intended only for use of the addressee. If this message
was sent to you in error, please notify the sender and delete this
message. MSoft eSolutions Limited cannot accept responsibility for viruses,
so please scan attachments. Views expressed in this message do not
necessarily reflect those of MSoft eSolutions Limited who will not
necessarily be bound by its contents.


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


retrieving message from application.resources file

Posted by Jay Sheth <sh...@gmail.com>.
Hi,
I need to read a property global.format.date = dd/mm/yyyy in a form
class (eg logonform.java) from application.properties file.

How do i do tht ?

thanks,
Jay

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