Laurent <lg83news <at> free.fr> writes:
> I have a few settings in my webapp (address of the LDAP server, location
> of 2 or 3 files), which are in the source code at the moment. This makes
> it difficult to change them (and I have to recompile every time).

I like to store settings that a system administrator will need to be able to
change in a configuration "properties"-style file, outside of the webapp
directory or ".war" file.  XML-based configuration files may be appropriate for
applications where the configuration options are more complex.  Other options
include the WEB-INF/web.xml file or, as you said, resource files.

My reasoning for storing them completely outside of the webapp or ".war" file 
is:

* I think it allows you to communicate what you consider application
"configurations" that a system administrator will need to update.  Everything
else (Java code, JSP's, Struts and Tiles Config Files, etc.) is "code" and part
of the application, and therefore not expected to be change once released to
system administrators.

* When you release a webapp update, the system administrator can safely
overwrite the old webapp without losing configuration changes.  Of course, you
will likely still need to merge new configuration parameters as part of many
webapp updates.

John



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to