Setting deployment-descriptor values
An important task is to place run-time values (similar to environment-variable values) into the deployment descriptor of your J2EE module. You can interact with a workbench editor listed in the next table, for example; and in any case, the editors are available if you wish to reassign a value.
Project type Name of deployment descriptor How to assign values application client application-client.xml Use the XML editor, Design tab EJB ejb-jar.xml Use the EJB editor, Beans tab J2EE Web web.xml Use the web.xml editor, Environment tab The recommended way to update the deployment descriptor is to add content automatically, as happens if all of the following conditions apply:
- You are generating a Java program or wrapper
- The build descriptor option genProperties is set to GLOBAL or PROGRAM
- You are generating for J2EE run time by setting J2EE to YES
- You set genProject to a valid J2EE project
EGL never deletes a property from an existing deployment descriptor, but does as follows:
- Overwrites properties that already exist
- Appends properties that do not exist
Another method of updating the deployment descriptor is to paste values from the J2EE environment file, which is an output of generation if all of the following conditions apply:
- You are generating a Java program
- The build descriptor option genProperties is set to GLOBAL or PROGRAM
- You are generating for J2EE run time by setting J2EE to YES
- You do not set genProject to a valid J2EE project, as when you generate into a directory instead
Before you paste entries from a J2EE environment file into the deployment descriptor of an application client or EJB project, you need to change the order of entries in the file, as described in Updating the J2EE environment file. You do not need to change the order of entries if you are working with a J2EE Web project.
For details on deployment descriptor properties, see Java run-time properties (details).
Related concepts
J2EE environment file
Generation of Java code into a project
Program properties file
Related tasks
Processing Java code that is generated into a directory
Setting up the J2EE run-time environment for EGL-generated code
Updating the J2EE environment file
Updating the deployment descriptor manually
Related reference
genDirectory
genProperties
J2EE
Java run-time properties (details)