Override the WebContent

JGAS installation files are generally subject to change with upgrades. If you need to keep a consistent version of the WebContent directory, then you can override it when deploying a war file. The override option is explained.

It is not recommended to modify the WebContent directory provided in the installation but instead you can override it with one provided by you when building a war file.

This allows you to keep the WebContent directory as part of your project and avoid modifying the original installation or risk losing your modifications after a JGAS product upgrade.

The following command to build a war shows an example using two --web-content options to specify the override. Line breaks have been added to the command examples to improve readability.
fglgar war --input-gar myApp.gar --output myApp.war 
           --web-content $JGASDIR/WebContent 
           --web-content myWebContent/WebContent ...
Web content directories are copied in the order of appearance on command line; the second web content directory overwrites the first one.
Important:

When creating your own WebContent directory, make sure it uses the same directory structure as the original installation WebContent directory.

When building the war file, the WebContent directory provided in the installation is first copied. Then it is overwritten with whatever files you have added to the WebContent directory provided in the second option.