Adding substitution variables to an enterprise application targeted for a WAS

A substitution variable is a configuration property that can be used to provide a parameter for any value in a WebSphere® Application Server configuration. The variable has a name and a value to be used in place of that name wherever the variable name is located within the configuration files.

Prerequisite

To add a substitution variable use the WAS Deployment editor by completing the following steps:

  1. Switch to the Java™ EE perspective.

  2. The location of the WAS Deployment editor depends on the specification-level of your enterprise application project:

    • If your enterprise application (EAR) project is at 1.2, 1.3 or 1.4 specification-level, complete the following steps:

      1. In the Enterprise Explorer view, expand your enterprise application project folder.

      2. Under the enterprise application project folder for which you want add or edit server configurations, double-click the

        Deployment Descriptor to open the Application Deployment Descriptor editor.

      3. Select the

        Deployment tab at the bottom of the editor.

      Restriction: Before adding or removing J2EE modules, using the

      Module page in the Application Deployment Descriptor editor, first click the

      Deployment tab to activate the functions in the deployment page. Then add or remove your modules from the Module page. You need to complete this task for each Application Deployment Descriptor editor session that you want to add or remove modules from the Module page.

    • If your enterprise application (EAR) project is at 5.0 specification-level, complete the following steps:

      1. In the Enterprise Explorer view, right-click your enterprise application project folder.

      2. Select

        Java EE | Open WAS Deployment.

  3. Expand the

    Substitution Variables section.

  4. Click the

    Add button beside the Variables list table. The Add a Variable dialog box opens.

  5. In the dialog box, fill in a name, value, and description for the variable. For example, a variable with the symbolic name CONFIG_ROOT could represent the path C:\WebSphere\AppServer\Config. For more information about any of the fields on this dialog box, select the field and then press

    F1. Click OK.

  6. Save your changes and close the editor. The substitution variables entries have been added to the deployment descriptor files.