Customizing the Web Application Descriptor

The web application descriptordefined in a file named web.xml is a standard Java EE web application file. A Cúram web application contains various settings that a developer may wish to change, for example, server connection settings and the session time-out. The default settings can be seen in the following files based on the environment you are running the application from:

Development Environment
<cdej-dir>/lib/curam/web/WEB-INF/web.xml
IBM® WebSphere® Application Server
<cdej-dir>/ear/WAS/war/WEB-INF/web.xml
WebLogic Application Server
<cdej-dir>/ear/WLS/war/WEB-INF/web.xml

Customizing the web.xml file is done differently depending on whether you are changing the version of the file to be included in the Cúram EAR file or the version to be used at development time (e.g. in Apache Tomcat).

Customizing the web.xml for development time can be done by creating a custom version of the web.xml file in the WebContent/WEB-INF directory of a particular component, e.g. custom. Where multiple versions of web.xml exist in different components, the version in the highest precedence component, based on CLIENT_COMPONENT_ORDER, will be used.

The web.xml used within a Cúram EAR file can be customized using the deployment_packaging.xml file located in the Curam Server project/config directory. It is possible to specify a custom web.xml using the custom-web-xml property. For more information on customizing web.xml at runtime please consult the Cúram Deployment Guide for the relevant Application Server.

When customizing web.xml, the existing security, filter and servlet settings should not be modified.

The server and port settings in ApplicationConfiguration.properties are now obsolete and no longer need to be specified. They are now automatically configured as context-param elements in web.xml when the Cúram EAR file is created. The server and port values are set according to the values specified in the AppServer.properties files (see the Cúram Server Deployment Guides for more information), with the exception of the web.xml used at development time. The development web.xml, located in <cdej-dir>/lib/curam/web/WEB-INF/web.xml, has the server and port set to localhost and 900 respectively.

To change or add a locale, locate the init-param elements of the ActionServlet and duplicate them, changing the value of the param-name element as appropriate so it is in the form config/<locale-code>. See the example below.

Figure 1. Configuring an Application Locale
<init-param>
  <param-name>config/en</param-name>
  <param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>

By default the web.xml for both WebSphere and WebLogic application servers is configured to enforce secure http (https), i.e. a secure SSL connection between the web client and the server. This can be modified by changing thetransport-guarantee from CONFIDENTIAL to NONE. Note, this does not disable access to the Cúram web client over https, but enables additional access via http. Please refer to the Curam Security Handbook for further details.