Web.xml Fragments

A fragment is a web.xml part file describing a specific component, such as an SCM framework or a timer servlet.

The installation directory for web.xml fragments is: SERVER_INSTALL\PLATFORM\resources\warutil\fragment\

Web.xml fragments are stored in this directory as *.web.xml.part.

To add your own section to web.xml, you add a fragment to that directory.

Related Topics
Fragment Files
Excluded Jars
About web.xml Parameters

Some web.xml.part files that are delivered in the fragment directory may include the following:

Fragment File Name Description
FRAMEWORK.timer_servlet.web.xml.part.deactivated Timer servlet
FRAMEWORK.static_content_caching.web.xml.part Static browser content cache
FRAMEWORK.parameters.web.xml.part Main parameters

Activating web.xml fragments

Certain features that are not activated by default, such as the timer servlet, are stored in the fragment directory as *.web.xml.part.deactivated. To activate one of these features, you simply rename the file to *.web.xml.part, and then modify the file as desired.

WAR Utility properties

In earlier versions of the WAR Utility, some properties were modified by editing the ematrix.xml file to change the behavior of the software. Starting in V6R2012, the ematrix.xml file is no longer provided and these properties are now set using environment variables in a fragment file.

Property Name in ematrix.xml New Environment Variable Name Description Possible Values Default Value
createstaticzip WARUTIL_CREATESTATICAIP Create a zip file Y/N Y
createearfile WARUTIL_CREATEEARFILE Create an application server archive Y/N Y
staticcontentin war WARUTIL_STATICCONTENTINWAR Put static data in generated war archive Y/N Y

WAR Utility return code

The WAR Utility returns the return code of the Java program:

  • A successful build returns 0.
  • Failed build return other values.

Build logs are still available in the ematrixwar.log file (in the SERVER_INSTALL\logs\ directory.

Resource files

If you want to add a static resource to a web application, before launching the WAR Utility, you can add the resource to the SERVER_INSTALL\PLATFORM\resources\ directory. This directory is also available through the symbolic link SERVER_INSTALL\managed\resources\.