JSP batch compiler
WAS allows you to compile JavaServer Pages files written to the JSP specification as a batch. This improves performance by reducing the response time on the first request. Prior versions of WAS compile JSP files only when the page is first requested. For iSeries, another option to consider is to use the Pre-touch tool which can compile and load JSP class files into the Application server JVM for improved performance over the JSP batch compiler.
Product
The JSPBatchCompiler script is available in WAS.
Authority
To run this script, your user profile must have *ALLOBJ authority.
Usage
To use the batch compiler for JSP files, follow these steps:
- On an iSeries command line, run the Start Qshell (STRQSH) command.
- The Qshell command prompt $ appears.
- To change your directory, enter
cd /QIBM/ProdData/WebAS5/Base/bin- Run the JspBatchCompiler command.
Syntax and parameters
The syntax of the JspBatchCompiler command:
JspBatchCompiler -enterpriseapp.name name [ -instance name ] [ -webmodule.name name ] [ -cell.name name ] [ -node.name name ] [ -server.name name ] [ -classloader.parentFirst <true|false>] [ -classloader.singleWarClassloader <true|false>] [ -filename jsp name ] [ -keepgenerated <true|false> ] [ -verbose <true|false> ] [ -deprecation <true|false> ]where the parameters are:
enterpriseapp.name
The name of the Enterprise Application you want to compile.instance
The name of the WebSphere instance. If this argument is not set, the script uses default WebSphere instance.webmodule.name
The name of the specific Web module that you want to compile. If this argument is not set, all Web modules in the enterprise application are compiled.cell.name
The name of the cell in which the application is deployed. The default is BaseApplicationServerCell.node.name
The name of the node in which the application is deployed. The default is DefaultNode.server.name
The name of the server in which the application is deployed. The default is server1.classloader.parentFirst
Defines the search order for classes and resources used by JSPs. If set to true, the parent classloader is searched before the Web module. If set to false, this order is reversed. The default is true.classloader.singleWarClassloader
Indicates whether each Web module of a given enterprise application has its own classloader. If set to false, each Web module will have its own classloader. The default is true.filename
The name of a single JSP file that you want to compile. If this argument is not set, all files in the Web module are compiled. Alternatively, if filename is set to the name of a directory, only the JSP files in that directory are compiled.keepgenerated
If set to true, WAS saves the generated .java files used for compilation on your server. By default, this is set to false and the .java files are erased after the class files have been compiled.verbose
Indicates the compiler should generate verbose output while compiling the generated sources.deprecated
Indicates the compiler should generate deprecation warnings while compiling the generated sources.
Note: If the names that are specified for these arguments are composed of two or more words separated by spaces, add quotation marks (") around the names.
Following compilation, compiled .class files for the JSPs in the examples Web module are found within the temp subdirectory of the instance. For the default instance, this is /QIBM/UserData/WebAS5/Base/default/temp.