struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nuwan Chandrasoma" <mymail...@gmail.com>
Subject Re: Setting application properties
Date Thu, 19 Jul 2007 10:40:21 GMT
Hi,

Add a property file to your classpath, read it from your java code. this is 
what i got from google :)

http://www.exampledepot.com/egs/java.util/Props.html

http://www.javaworld.com/javaworld/javaqa/2003-08/01-qa-0808-property.html?page=1

Thanks,

Nuwan


----- Original Message ----- 
From: "SimonK" <sleepingwell@gmail.com>
To: <user@struts.apache.org>
Sent: Thursday, July 19, 2007 4:42 AM
Subject: Setting application properties


>
> Hi all,
>
> I am new to struts, so please forgive me if this question has an obvious
> answer.
>
> I want to be able to define some global settings for my application, such
> as:
>
> - the path to the applications temporary directory;
> - the path to a static (input) data directory;
> - the location/name of a db.
>
> This (and other such constants) will be required by multiple actions and
> Inteceptors.
>
> Ideally I'd like this information to be separate to the web.xml and
> struts.xml files, and in "key = value" form (... exactly like that of a
> property file).
>
> What is the canonical way of doing this?
>
> Note - I'm having trouble findng information on how to deal with property
> files.
>
> Cheers,
> Simon.
> -- 
> View this message in context: 
> http://www.nabble.com/Setting-application-properties-tf4108144.html#a11682293
> 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
> 


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


Mime
View raw message