I ansking me what is the best solution to configure a WebApp during its deployment.
What I want to do is the following :
- I've a development machine and a production machine,
- the directories used by my WebApp are differents on both machine
- So I want to tell my WebApp where are the directories it must use.
I can't put this in a properties file included in the war
because I can't modify this properties files.
A solution is to have a properties not included in the WebApp (so specific to a machine) but how to tell my WebApp to use it ?
An other solution should be to define parameter of the JVM with -D for example supposing a JVM is started for a war.
The question can be understand as :
how to parametrize a WebApp with JBOSS (with WebSphere you can pass -D argument to the JVM for example).
Thank's in advance.
I've found how to do :
in the deploy directory you have a properties-service.xml.
In this file you can set an URL to a property files which is ouside the war.
This works fine, and when this xml file is modified, it is hot-deployed (no restart needing).