To specify the property settings for the J2EE applications, use the server management commands.
This subsection describes how to specify the settings for J2EE applications, assuming that the archive-format J2EE applications (EAR format/ ZIP format) and exploded archive-format J2EE applications are already created. Use products like WTP to create J2EE applications during application development. For details on creating an application, see 4. Developing J2EE Applications Using Eclipse in the uCosminexus Application Server Application Development Guide.
- Reference note
- With the server management commands, you can also create an archive-format J2EE application from the created EJB-JAR file and WAR file. For details on how to create the archive-format J2EE applications using the server management commands, see 13.3 Archive-format J2EE applications.
The following figure shows the flow of settings for a J2EE application.
Figure 13-6 Flow of J2EE application settings
![[Figure]](figure/zu090650.gif)
A description of points 1 to 3 in the figure is as follows:
- Use the server management commands to import the J2EE application.
Use the cjimportapp command to import the J2EE application.
- To import an archive-format J2EE application, specify an EAR-format/ ZIP-format file in the -f option.
- To import an exploded archive-format J2EE application, specify the application directory in the -a option.
- To import an EAR-format/ ZIP-format file in the exploded archive format, specify the EAR-format/ ZIP-format file in the -f option and specify the expansion destination directory that forms the application directory in the -d option.
- Use the server management commands to add a servlet filter in the J2EE application.
When you add a servlet filter, register the filter in the WAR file and then define the filter mapping. For details on adding a servlet filter, see 9.9 Filter settings in the uCosminexus Application Server Application Setup Guide.
- Use the server management commands to define the J2EE application properties.
Obtain the property file using the cjgetappprop command and after editing the file, use the cjsetappprop command to apply the edited contents. For details on the property settings, see 9.1 Overview of the settings for the J2EE application properties in the uCosminexus Application Server Application Setup Guide.
For details on the operations with the server management commands, see 3. Basic Operations of the Server Management Commands in the uCosminexus Application Server Application Setup Guide. For details on the commands, see 2.3 Commands used with J2EE applications in the uCosminexus Application Server Command Reference Guide. For details on the property files, see 3. Property files Used for Setting up J2EE Applications in the uCosminexus Application Server Application and Resource Definition Reference Guide.
- Reference note
- In the following cases, the J2EE applications can be set up efficiently by exporting or importing the J2EE applications containing the runtime information:
- When a J2EE application created in the development environment is exported and then imported and used in the operating environment
- When a J2EE application already running in the operating environment is exported and then imported and used on an additional J2EE server
- Note that the J2EE applications cannot be exported or imported between hosts with different Application Server versions and platforms. To set up a J2EE application on the host that exports the J2EE application and the host with a different Application Server version and platform, create and set up a new J2EE application.