uCosminexus Application Server, Web Container Functionality Guide

[Contents][Glossary][Index][Back][Next]

2.5.5 Lifecycle and output destination of JSP compilation results

JSP is compiled in a Web container, and the Java source files and class files are generated. With a Web container, you can specify whether to maintain the Java source files and class files that serve as JSP compilation results, when a J2EE server is restarted. This subsection describes the settings for maintaining the compilation results of the JSP file.

This subsection explains the lifecycle and the output destination of the JSP compilation results when you use the JSP pre-compilation functionality.

Organization of this subsection
(1) Lifecycle of JSP compilation results
(2) Output destination of JSP compilation results

(1) Lifecycle of JSP compilation results

The lifecycle of the JSP compilation results when you use the JSP pre-compilation functionality is explained below:

Generating the compilation results
In the case you use the JSP pre-compilation functionality, compilation results are generated when:
  • The cjjspc command is executed
  • The Web application is started by specifying -jspc option in the cjstartapp command

Deleting the compilation results
For J2EE applications in the archive format, the compilation results generated by JSP pre-compilation functionality during the startup of the application will be deleted, when the application stops.

(2) Output destination of JSP compilation results

When you implement the JSP pre-compilation functionality, the JSP working directory is created, and the JSP compilation results are output to the JSP working directory. If, however, the JSP files to be compiled do not exist, the JSP working directory is not created. The following files are output:

  1. Java source files# generated from JSP files
  2. Class file that compiles the Java source files mentioned in 1.
  3. Java source files# generated from tag files
  4. Class file that compiles the Java source files mentioned in 3.
    #
    When implementing the JSP pre-compilation functionality, you can specify whether to save the Java source files.

The default output destination and the configuration of the output destination directory are explained below: For details on the names of the output classes, see 2.5.7 Class names in JSP compilation results.

(a) Default output destination

When you execute the JSP pre-compilation functionality, the compilation results are output to the JSP working directory. The default JSP working directory is at the following location:

In Windows
Web-application-web-inf-directory\cosminexus_jsp_work

In UNIX
Web-application-web-inf-directory/cosminexus_jsp_work

If the WEB-INF directory does not exist, the WEB-INF directory and JSP work directory are automatically created when the JSP work directory is created.

Note that the default value is set for the name of the JSP working directory. However, if necessary, you can change the name. For details on changing the name of the JSP work directory during the JSP pre-compilation by the cjjspc command, see cjjspc (JSP pre-compilation) in the uCosminexus Application Server Command Reference Guide. For details on changing the name of the JSP work directory during the JSP pre-compilation when the J2EE application is started by the cjstartapp command, see 2.5.8 Execution environment settings (J2EE server settings).

Also, when you change the name of the JSP work directory, you must specify the name of the changed JSP work directory in the parameter webserver.jsp.precompile.jsp_work_dir within the <configuration> tag of the logical J2EE server (j2ee-server) of the Easy Setup definition file. For details on the Easy Setup definition file and the parameters to be specified, see 4.6 Easy Setup definition file in the uCosminexus Application Server Definition Reference Guide.

(b) Configuration of output destination directory

The JSP compilation results are output to the JSP working directory. The following figure shows the configuration of the output destination directory for JSP compilation results. Note that in the following figure, default directory name is used for the JSP working directory.

Figure 2-7 Configuration of output destination directory for JSP compilation results (When JSP pre-compilation is executed)

[Figure]

The directory configuration is explained below: