Possible to leave config files outside of WAR

Hi,

Currently have default-web.xml in my /usr/sunone/https-.../config directory, and all is working ok. I did this because out test and prod systems have different parameters.

Is it possible to do something similar with the sun-web.xml file? I tried taking it out of the WAR and putting it into the above config dir, but it didnt get picked up.

[363 byte] By [kellygaa] at [2007-11-27 2:17:31]
# 1
sun-web.xml is specific for your web application only. You can't put it in config directory. config directory is used for common/system usage.Why do you want to move it out of application?
wyb2005a at 2007-7-12 2:16:02 > top of Java-index,Web & Directory Servers,Web Servers...
# 2

For Web Server 6.1, we decided not to deploy WAR files as war files, but wrote some simple deployment scripts that, in effect, extract the war file into the directory referenced in server.xml. This allows us to automate modifications to any files (either completely replace them, or modify them) in order to overwrite the test values with production values. This provides a number of benefits:

- development & QA staff (and the source code repository!) never see production values

- we deploy the exact same WAR file in production that went through QA

- our "transformation" logic allows our workflow & security to better track roles & responsibilities (e.g. only the database group can make changes to the production JDBC connection strings, only the security group can change passwords, etc.)

The basic logic (minus some sanity checks, logging, notification, etc.) is

- unpack the war file into a new directory appname.new

- replace and transform configuration files under appname.new as needed

- rename directory appname to appname.old

- renames directory appname.new to appname

- run the "reconfig" script if there are major (not JSP or stattic file) changes

PeterWatkinsa at 2007-7-12 2:16:02 > top of Java-index,Web & Directory Servers,Web Servers...
# 3

It is not clear to me why don't you out the sun-web.xml and web.xml in the WEB-INF/ directory under the directory that is referenced in server.xml, as for example:

...

<web-app>

<uri>/jspcart</uri>

<path>/path/to/app-directory</path>

</web-app>

...

inside this /path/to/app-directory, you have a WEB-INF directory, and put the xml files there. Why is that not workable with the setup you have?

Web apps do not have to be deployed as war files, they can be directories reflecting the directory structure of a war file. This is a pretty common setup.

nseguraa at 2007-7-12 2:16:02 > top of Java-index,Web & Directory Servers,Web Servers...