wljspc

Description

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

Tested only on WebLogic 4.5.1—NT 4.0 and Solaris 7 & 8

Parameters

Attribute Values Required
src root of source tree for JSP, ie, the document root for your WebLogic server Yes
dest root of destination directory, what you have set as WorkingDir in the WebLogic properties Yes
package start package name under which your JSPs would be compiled Yes
classpath Class path to use when compiling JSPs Yes

A classpath should be set which contains the WebLogic classes as well as all application classes referenced by JSP. The system classpath is also appended when the jspc is called, so you may choose to put everything in the classpath while calling Apache Ant. However, since presumably JSPs 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

Example

<target name="jspcompile" depends="compile">
  <wljspc src="c:\\weblogic\\myserver\\public_html" dest="c:\\weblogic\\myserver\\serverclasses" package="myapp.jsp">
    <classpath>
      <pathelement location="${weblogic.classpath}"/>
      <pathelement path="${compile.dest}"/>
    </classpath>
  </wljspc>
</target>

Limitations