I have a Java web application that unloads some environment parameters (Hibernate configurations, necessary directory paths, etc.) in a properties file that is ultimately packaged in a deployed WAR. If I want to distribute this web application, what is the best way to handle these settings? It is not possible to ask the user to open a WAR, update the properties file, repackage the WAR, and then deploy. I was thinking of creating an installer (e.g. NSIS, WiX) that requests properties, writes them to the WAR, and then requests the deployment location for the WAR. Another option is to have a properties file external to the WAR, and based on the agreement, the web application will know where to read the file. What is the best practice in this case?
source
share