The application directory is the root directory of an exploded archive-format J2EE application. When you create an exploded archive-format J2EE application, you create the application directory and store the components, such as the EJB-JAR or Web applications, in the application directory. The following table describes the configuration of the application directory.
Table 13-3 Configuration of the application directory
Directory | Explanation of the directory | |||
---|---|---|---|---|
Application-directory | This is the root directory of the exploded archive-format J2EE applications. You can enter a name of your choice for the application directory. | |||
META-INF | This directory stores the DD and cosminexus.xml of J2EE applications. The files application.xml and cosminexus.xml are stored directly beneath this directory. | |||
EJB-JAR-directory | This is the root directory for EJB applications. | |||
META-INF | This directory stores the DD of the EJB-JARs. The file ejb-jar.xml is stored directly beneath this directory. | |||
Package-name | This directory stores the class files and property files of the EJB-JARs.
| |||
WAR-directory | This is the root directory for Web applications. Note that the JSP files are stored directly beneath this directory.
| |||
WEB-INF | This directory stores the DD for Web applications. The file web.xml is stored directly beneath this directory. | |||
classes | This directory stores the servlet class files and property files.
| |||
lib | This directory stores the JAR files, such as the tag library.
| |||
RAR file # | This is the resource adapter used in a J2EE application. | |||
Library-directory | This directory stores the library JAR. If the application version is Java EE 5 or later, the library JAR is stored directly beneath this directory. |
#: Allocated when the resource adapter (RAR file) is included and used in a J2EE application. The RAR file is stored as an archive file. When the resource adapter is deployed as a J2EE resource adapter, the resource adapter need not be stored in the application directory.
Note the following points about the application directory:
The following is an example of creating an application directory.
This point describes an example configuration of an application directory when the EJB-JAR directory is subdir/converter, WAR directory is MyWebApp, and RAR file is rardir/DBConnector_DABJ_CP.rar, and an example of coding application.xml.
<?xml version="1.0" encoding="Shift_JIS" ?> |
When you change the application directory, sometimes the application directory cannot be changed or you must re-import the application after the application directory is changed, depending on the type of the target directory or file, or the operations performed. The operations required for changing the application directory are as follows.
The following table describes whether the application directory can be changed.
Table 13-4 Changing the application directory
Target | Directory and file | Operations for the directory and file | Application status | Explanation | |
---|---|---|---|---|---|
Stop | Start | ||||
J2EE application | Application directory | Add | -- | -- | -- |
Change contents | -- | -- | -- | ||
Rename | R | N | You cannot change the configuration of the application. | ||
Delete | R | N | You cannot change the configuration of the application. | ||
application.xml | Add | -- | -- | -- | |
Change contents | Y | N | You cannot compile the DD directly. Use the server management commands to update the DD definition.#1 | ||
Rename | -- | -- | -- | ||
Delete | R | N | -- | ||
cosminexus.xml | Add | NR | Y | -- | |
Change contents | NR | Y | -- | ||
Rename | -- | -- | -- | ||
Delete | NR | Y | -- | ||
EJB application | EJB-JAR directory | Add | R | -- | -- |
Change contents | -- | -- | -- | ||
Rename | R | N | You cannot change the configuration of the application. | ||
Delete | R | N | You cannot change the configuration of the application. | ||
EJB application | Class files configuring EJB | Add | NR | N | After adding a class, you must edit the attributes with the server management commands. |
Change contents | NR | N | When the method information is coded in the DD (container-transaction and method-permission), you must perform the modifications in sync with the DD information. | ||
Rename | R | N | If you try to change the class file name without changing the class file contents, an error occurs during the next class loader. | ||
Delete | NR | N | After deleting a class, you must edit the attributes with the server management commands. | ||
Other class files | Add | NR | N | -- | |
Change contents | NR | N | -- | ||
Rename | R | N | If you try to change the class file name without changing the class file contents, an error occurs during the next class loader. | ||
Delete | NR | N | -- | ||
EJB application | ejb-jar.xml | Add | -- | -- | -- |
Change contents | Y | N | You cannot compile the DD directly. Use the server management commands to update the DD definition.#1 | ||
Rename | -- | -- | -- | ||
Delete | R | N | -- | ||
Web application | WAR directory | Add | R | -- | -- |
Change contents | -- | -- | -- | ||
Rename | R | N | You cannot change the configuration of the application. | ||
Delete | R | N | You cannot change the configuration of the application. | ||
Class files and property files under WEB-INF/classes | Add | NR | N | -- | |
Change contents | NR | N | -- | ||
Rename | -- | -- | If you try to change the class file name without changing the class file contents, an error occurs during the next class loader. | ||
Delete | NR | N | -- | ||
JAR files under WEB-INF/lib | Add | NR | N | -- | |
Change contents | NR | N | -- | ||
Rename | NR | N | -- | ||
Delete | NR | N | -- | ||
web.xml | Add | -- | -- | -- | |
Change contents | Y | N | You cannot compile the DD directly. Use the server management commands to update the DD definition.#1 | ||
Rename | -- | -- | -- | ||
Delete | R | N | -- | ||
Web application | JSP files, Tag files, Static content (such as HTML and JavaScript), files on which the JSP files or tag files depend #2, JSP compilation results | Add | NR | N | -- |
Change contents | NR | N | -- | ||
Rename | -- | -- | -- | ||
Delete | NR | N | -- | ||
Library | Library JAR | Add | R | N | You cannot change the configuration of the application. The library JAR is ignored even if added. |
Change contents | NR | N | -- | ||
Rename | R | N | You cannot change the configuration of the application. | ||
Delete | R | N | You cannot change the configuration of the application. | ||
Reference library | Add | NR | N | Change the definition using the server management command (cjsetappprop). | |
Change contents | NR | N | -- | ||
Rename | -- | -- | Change the definition using the server management command (cjsetappprop). You cannot rename while the reference library is open. | ||
Delete | Y | N | Change the definition using the server management command (cjsetappprop). You cannot delete the definition while the reference library is open. | ||
Library | Directory of reference libraries | Add | NR | N | -- |
Change contents | NR | N | -- | ||
Rename | NR | N | -- | ||
Delete | NR | N | -- | ||
Resource adapter | RAR file | Add | R | N | -- |
Change contents | Y | N | You cannot change the RAR file directly. Use the server management commands to change the properties. | ||
Rename | R | N | -- | ||
Delete | R | N | -- |
Legend: