Network Deployment (Distributed operating systems), v8.0 > Reference > Command-line utilities


Batch compiler ant task


Overview

The ant task JspC exposes all the batch compiler configuration options. It runs the batch compiler under the covers. It is backward compatible with the WAS 5.x version of the JspC ant task. The following table lists all of the ant task attributes and their batch compiler equivalents.


JspC attributes and equivalent batch compiler parameters

JspC attribute Batch compiler parameter Notes
earPath -ear.path
warPath -war.path
src -war.path Same as warPath, for backward compatiblity
enterpriseAppName -enterpriseapp.name
responseFile -response.file
webmoduleName -webmodule.name
fileName -filename -config.root
configRoot -config.root
cellName -cell.name
nodeName -node.name
serverName -server.name
profileName -profileName
extractToDir -extractToDir
compileToDir -compileToDir -compileToDir Same as compileToDir, for backward compatibility
compileToWebInf -compileToWebInf
compilerOptions -compilerOptions
recurse -recurse
removeTempDir -removeTempDir
translate -translate
compile -compile
forceCompilation -forceCompilation
useFullPackageNames -useFullPackageNames
trackDependencies -trackDependencies
createDebugClassfiles -createDebugClassfiles
keepgenerated -keepgenerated
keepGeneratedclassfiles -keepGeneratedclassfiles
usePageTagPool -usePageTagPool
useThreadTagPool -useThreadTagPool
classloaderParentFirst -classloader.parentFirst
classloaderSingleWarClassloader -classloader.singleWarClassloader
additionalClasspath -additional.classpath
classpath -additional.classpath same as additionalClasspath, for backward compatibility
verbose -verbose
deprecation -deprecation
javaEncoding -javaEncoding
compileWithAssert -compileWithAssert
useJikes -useJikes
jspFileExtensions -jsp.file.extensions
logLevel -log.level
wasHome none
Classpathref none
jdkSourceLevel -jdkSourceLevel

Below is an example of a build script with multiple targets, each with different attributes. The following commands are used to launch the script:

On Windows:

ws_ant -Dwas.home=%WAS_HOME%
       -Dear.path=%EAR_PATH%
       -Dextract.dir=%EXTRACT_DIR%

ws_ant jspc2
       -Dwas.home=%WAS_HOME%
       -Dapp.name=%APP_NAME%
       -Dwebmodule.name=%MOD_NAME%

ws_ant jspc3
       -Dwas.home=%WAS_HOME%
       -Dapp.name=%APP_NAME%
       -Dwebmodule.name=%MOD_NAME%
       -Ddir.name=%DIR_NAME%

On UNIX or i5/OS:

ws_ant.sh -Dwas.home=WAS_HOME
          -Dear.path=$EAR_PATH
          -Dextract.dir=$EXTRACT_DIR

ws_ant jspc2
       -Dwas.home=WAS_HOME
       -Dapp.name=$APP_NAME
       -Dwebmodule.name=$MOD_NAME

ws_ant jspc3 -Dwas.home=WAS_HOME
       -Dapp.name=$APP_NAME
       -Dwebmodule.name=$MOD_NAME
       -Ddir.name=$DIR_NAME

Example build.xml file using the JspC task


<project name="JSP Precompile"
         default="jspc1"
         basedir=".">

<taskdef name="wsjspc"
         classname="com.ibm.websphere.ant.tasks.JspC"/>

<target name="jspc1"
        description="Example using a path to an EAR, and extracting the EAR to a directory">

<wsjspc wasHome="${was.home}"
        earpath="${ear.path}"
        forcecompilation="true"
        extractToDir="${extract.dir}"
        useThreadTagPool="true"
        keepgenerated="true"
     
  />
</target>

<target name="jspc2"
        description="Example using an enterprise app and webmodule">

<wsjspc wasHome="${was.home}"
        enterpriseAppName="${app.name}"
        webmoduleName="${webmodule.name}"
        removeTempDir="true"
        forcecompilation="true"
        keepgenerated="true"
     
  />
</target>

<target name="jspc3"
        description="Example using an enterprise app, webmodule and specific directory">

<wsjspc wasHome="${was.home}"
        enterpriseAppName="${app.name}"
        webmoduleName="${webmodule.name}"
        fileName="${dir.name}"
        recurse="false"
        forcecompilation="true"
        keepgenerated="true"
      
  />

</target>

</project>
JSP
JSPBatchCompiler command
Web applications: Resources for learning

+

Search Tips   |   Advanced Search