Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.tools.ant.taskdefs.optional.jsp
Class WLJspc

    java.lang.Object
      |
      +--org.apache.tools.ant.Task
            |
            +--org.apache.tools.ant.taskdefs.MatchingTask
                  |
                  +--org.apache.tools.ant.taskdefs.optional.jsp.WLJspc

public class WLJspc
extends MatchingTask

Class to precompile JSP's using weblogic's jsp compiler (weblogic.jspc)

Author:
  Avik Sengupta http://www.webteksoftware.com Tested only on Weblogic 4.5.1 - NT4.0 and Solaris 5.7 required attributes src : root of source tree for JSP, ie, the document root for your weblogic server dest : root of destination directory, what you have set as WorkingDir in the weblogic properties package : start package name under which your JSP's would be compiled other attributes classpath A classpath should be set which contains the weblogic classes as well as all application classes referenced by the JSP. The system classpath is also appended when the jspc is called, so you may choose to put everything in the classpath while calling Ant. However, since presumably the JSP's will reference classes being build by Ant, it would be better to explicitly add the classpath in the task The task checks timestamps on the JSP's and the generated classes, and compiles only those files that have changed. It follows the weblogic naming convention of putting classes in _dirName/_fileName.class for dirname/fileName.jsp Limitation: It compiles the files thru the Classic compiler only. Limitation: Since it is my experience that weblogic jspc throws out of memory error on being given too many files at one go, it is called multiple times with one jsp file each.

       example

Fields inherited from class org.apache.tools.ant.taskdefs.MatchingTask
`fileset, useDefaultExcludes`

Fields inherited from class org.apache.tools.ant.Task
`description, location, project, target, taskName, taskType, wrapper`

Constructor Summary
`WLJspc()`

Method Summary
`Path` | `createClasspath()` Maybe creates a nested classpath element.
`void` | `execute()` Called by the project to let the task do it's work.
`protected java.lang.String` | `replaceString(java.lang.String inpString, java.lang.String escapeChars, java.lang.String replaceChars)`
`protected void` | `scanDir(java.lang.String[] files)`
`void` | `setClasspath(Path classpath)` Set the classpath to be used for this compilation.
`void` | `setDest(java.io.File dirName)` Set the directory containing the source jsp's
`void` | `setPackage(java.lang.String packageName)` Set the package under which the compiled classes go
`void` | `setSrc(java.io.File dirName)` Set the directory containing the source jsp's

Methods inherited from class org.apache.tools.ant.taskdefs.MatchingTask
`createExclude, createInclude, createPatternSet, getDirectoryScanner, setDefaultexcludes, setExcludes, setExcludesfile, setIncludes, setIncludesfile, XsetIgnore, XsetItems`

Methods inherited from class org.apache.tools.ant.Task
`getDescription, getLocation, getOwningTarget, getProject, getRuntimeConfigurableWrapper, getTaskName, init, log, log, maybeConfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### WLJspc

    public WLJspc()

Method Detail

### execute

    public void execute()
                 throws BuildException

  Description copied from class: `Task`
  Called by the project to let the task do it's work. This method may be called more than once, if the task is invoked more than once. For example, if target1 and target2 both depend on target3, then running "ant target1 target2" will run all tasks in target3 twice.
  Overrides:
    `execute` in class `Task`
  Following copied from class: `org.apache.tools.ant.Task`
  Throws:
    `BuildException` - if someting goes wrong with the build

### setClasspath

    public void setClasspath(Path classpath)

  Set the classpath to be used for this compilation.

### createClasspath

    public Path createClasspath()

  Maybe creates a nested classpath element.

### setSrc

    public void setSrc(java.io.File dirName)

  Set the directory containing the source jsp's
  Parameters:
    `dirName` - the directory containg the source jsp's

### setDest

    public void setDest(java.io.File dirName)

  Set the directory containing the source jsp's
  Parameters:
    `dirName` - the directory containg the source jsp's

### setPackage

    public void setPackage(java.lang.String packageName)

  Set the package under which the compiled classes go
  Parameters:
    `packageName` - the package name for the clases

### scanDir

    protected void scanDir(java.lang.String[] files)

### replaceString

    protected java.lang.String replaceString(java.lang.String inpString,
                                             java.lang.String escapeChars,
                                             java.lang.String replaceChars)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000 Apache Software Foundation. All Rights Reserved.