geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From appel <arn...@siminn.is>
Subject Re: How to read and write a bundle properties in a war?
Date Thu, 05 Jul 2007 09:44:51 GMT


appel wrote:
> 
> Hi,
> 
> I have inside my war file, which is extracted when deployed in Geronimo, a
> properties file I want to both read, and also write. Reading the file is
> easy with ResourceBundle, but I can't think of a way to modify the
> properties file... for instance changing the value of some property.
> 
> I can open the file manually with a full path, but I don't want my web app
> to be dependent on the system it's deployed, for instance if I have to
> deploy it on another computer using Geronimo and it's located in another
> directory.
> 

However, I don't want to override any changes to the properties file if I
redeploy the application, so I need to generate the properties file the
first time the application is run and keep it OUTSIDE the
extracted-directory.

That is...

My Geronimo installation is located in "/opt/geronimo", and my deployed web
application is located in
"/opt/geronimo/repository/stuff/SomeApp/0.1/SomeApp-0.1.war/"

But, if I write a file (with no path) it will be written into
"/opt/geronimo/bin/somefile". I want this "somefile" to be written into
"/opt/geronimo/repository/stuff/SomeApp/0.1/", but this path can change
depending on how I deploy it and where.

Any ideas?



-- 
View this message in context: http://www.nabble.com/How-to-read-and-write-a-bundle-properties-in-a-war--tf4028664s134.html#a11443595
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Mime
View raw message