I have a small app which contains a single property file. It also needs to
create a database when it starts up. The property file tells it where to do
this. I want to deploy it as a war file. However this would mean users will
have to unzip the war alter the property file, zip it up again before
dropping it on their app server. Is there a better way of separating the
code and configuraiton information when deploying java applications.
Thanks
Jon
dayjah - 30 May 2006 12:32 GMT
How about you do not have these properties set in the properties file.
Then when the app first starts it checks for these being set or not. If
they are not set it goe through to a setup process where people can
configure these settings. The app the creates the needed
databases/tables, etc and sets the properties to be true. Then on each
subsequent start up it will not reconfigure and can just run as normal?
Mike
John Smith - 30 May 2006 13:06 GMT
Would this work if the app server did not exploded the war file?
Thanks
Jon
> How about you do not have these properties set in the properties file.
> Then when the app first starts it checks for these being set or not. If
[quoted text clipped - 4 lines]
>
> Mike
Alex Hunsley - 30 May 2006 15:28 GMT
> Would this work if the app server did not exploded the war file?
>
> Thanks
I think the replier was meaning for you to have a properties file
outside of the jar, in the file system, somewhere in the web application
space.
dayjah - 31 May 2006 09:23 GMT
> > Would this work if the app server did not exploded the war file?
> >
[quoted text clipped - 3 lines]
> outside of the jar, in the file system, somewhere in the web application
> space.
that is correct. Sorry I didn't make this clear!
Andrea Desole - 30 May 2006 12:50 GMT
> I have a small app which contains a single property file. It also needs to
> create a database when it starts up. The property file tells it where to do
> this. I want to deploy it as a war file. However this would mean users will
> have to unzip the war alter the property file, zip it up again before
> dropping it on their app server. Is there a better way of separating the
> code and configuraiton information when deploying java applications.
If you want to configure a data source your best approach is probably JNDI