web server - Borland Technical Publications

web server - Borland Technical Publications web server - Borland Technical Publications

techpubs.borland.com
from techpubs.borland.com More from this publisher
12.11.2014 Views

Using the iastool command-line tools Options The following table describes the options available when using the compilejsp tool. Option -src -target -overwrite -package -excludefile -loglevel -classpath Description Specifies the WAR or EAR file you want to compile. The full or relative path to the file must be specified. There is no default. Specifies the name of the target WAR or EAR archive file to be generated. If file name you specify already exists, use the -overwrite option to overwrite the previously existing target. The full or relative path to the file must be specified. There is no default. Indicates that the should be overwritten if it previously existed. If exists but -overwrite is not used, you will get an error message saying that the target JAR must be different from the source JAR. Specifies the base package name for the precompiled JSP servlet classes. The default is com.bes.compiledjsp. Specifies a text file containing a list of JSP files to exclude from the compile operation. See “Using the excludefile option” on page 295 for more details. Specifies the amount of output diagnostic messages to be generated. A value greater than 2 will also leave the temporary servlet Java files for further inspection. The default is 2. Specifies any additional libraries that may be required for compiling the JSP pages. There is no default. Example To precompile the JSP pages contained in a WAR file called proj1.war located in the current directory into a WAR file called proj1compiled.war in the same location: iastool -compilejsp -src proj1.war -target proj1compiled.war To precompile the JSP pages contained in an EAR file called proj1.ear located in the directory c:\myprojects\ into an EAR file called proj1compiled.ear in the same location and generate the maximum amount of diagnostic messages: iastool -compilejsp -src c:\myprojects\proj1.ear -target c:\myprojects\proj1compiled.ear -loglevel 4 Using the excludefile option The compilejsp excludefile option allows you to specify a text file containing a list of JSPs to exclude from the compile operation. The following list details the usage rules. ■ ■ ■ ■ ■ ■ Comment lines (with a leading '#') and blank lines are ignored. Leading and trailing blank spaces and white spaces on each line are trimmed. Each line in the exclude file represents one exclude pattern entry, which can be a string for exact matching or a Java Pattern regular expression. Each JSP exclude entry is used to perform an exact match against a JSP URL first. If there is no match, the JSP exclude entry will be used as a regular expression to match against the JSP URL again. A JSP URL is compared against each of the JSP exclude entries using the above algorithm. As soon as there is a match, the JSP is excluded from compilation. If the JSP URL does not match any of the JSP exclude entries, the JSP will be compiled. If a pattern entry is not a valid Java regular expression, a warning is shown. It will still be used to compare against JSP URLs for exact match. Chapter 29: iastool command-line utility 295

Using the iastool command-line tools ■ If the iastool -compilejsp -loglevel option is set to 3 or higher, the exclude pattern entries, the number of excluded JSP pages, and the excluded JSP URLs are be displayed. ■ If all of the JSP files in the archive are excluded the -compilejsp command will fail. The following are some example exclude patterns: # This pattern excludes a specific JSP: /jsp/test/test.jsp /jsp/test/test[.]jsp # This pattern excludes the JSP /jsp/test/test.jsp or /jsp/test/test2jsp, etc. # because the regular expression "." represents any character /jsp/test/test.jsp # This pattern excludes all the files under the /include URL path /include/.* # This pattern excludes all the include.jsp files .*/include[.]jsp # This pattern excludes all the JSP files that start with "tmp_" in the /jsp URL path # and all JSP files in any URL path that starts with "tmp_" under /jsp /jsp/tmp_.*[.]jsp # This pattern excludes all the JSP files that start with "tmp_" in the /jsp URL path /jsp/tmp_[^/]*[.]jsp compress Use this tool to compress a JAR file. Syntax -compress -src -target Default Output By default, compress reports if the operation was successful or not. Options The following table describes the options available when using the compress tool. Option -src -target Description Specifies the JAR file that you want to compress. The full or relative path to the file must be specified. There is no default. Specifies the name of the compressed JAR file to be generated. The full or relative path to the file must be specified. There is no default. Example To compress a JAR file, called proj1.jar and located in the current directory, into a file called proj1compress.jar in the same location: iastool -compress -src proj1.jar -target proj1compress.jar 296 BES Developer’s Guide

Using the iastool command-line tools<br />

■<br />

If the iastool -compilejsp -loglevel option is set to 3 or higher, the exclude pattern<br />

entries, the number of excluded JSP pages, and the excluded JSP URLs are be<br />

displayed.<br />

■<br />

If all of the JSP files in the archive are excluded the -compilejsp command will fail.<br />

The following are some example exclude patterns:<br />

# This pattern excludes a specific JSP: /jsp/test/test.jsp<br />

/jsp/test/test[.]jsp<br />

# This pattern excludes the JSP /jsp/test/test.jsp or /jsp/test/test2jsp, etc.<br />

# because the regular expression "." represents any character<br />

/jsp/test/test.jsp<br />

# This pattern excludes all the files under the /include URL path<br />

/include/.*<br />

# This pattern excludes all the include.jsp files<br />

.*/include[.]jsp<br />

# This pattern excludes all the JSP files that start with "tmp_" in the /jsp<br />

URL path<br />

# and all JSP files in any URL path that starts with "tmp_" under /jsp<br />

/jsp/tmp_.*[.]jsp<br />

# This pattern excludes all the JSP files that start with "tmp_" in the /jsp<br />

URL path<br />

/jsp/tmp_[^/]*[.]jsp<br />

compress<br />

Use this tool to compress a JAR file.<br />

Syntax<br />

-compress -src -target <br />

Default Output<br />

By default, compress reports if the operation was successful or not.<br />

Options<br />

The following table describes the options available when using the compress tool.<br />

Option<br />

-src <br />

-target <br />

Description<br />

Specifies the JAR file that you want to compress. The full or relative<br />

path to the file must be specified. There is no default.<br />

Specifies the name of the compressed JAR file to be generated.<br />

The full or relative path to the file must be specified. There is no<br />

default.<br />

Example<br />

To compress a JAR file, called proj1.jar and located in the current directory, into a file<br />

called proj1compress.jar in the same location:<br />

iastool -compress -src proj1.jar -target proj1compress.jar<br />

296 BES Developer’s Guide

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!