[14982] | 1 | <html>
|
---|
| 2 | <link rel="stylesheet" type="text/css" href="../stylesheets/antmanual.css">
|
---|
| 3 | <head><title>WLJSPC Task</title></head>
|
---|
| 4 | <body>
|
---|
| 5 | <h2>wljspc</h2>
|
---|
| 6 | <h3>Description</h3>
|
---|
| 7 | <p>Class to precompile JSP's using weblogic's jsp compiler (weblogic.jspc)</p>
|
---|
| 8 | Tested only on Weblogic 4.5.1 - NT4.0 and Solaris 5.7,5.8<br>
|
---|
| 9 | <h3>Parameters</h3>
|
---|
| 10 | <table border="1" cellPadding="2" cellSpacing="0">
|
---|
| 11 | <tbody>
|
---|
| 12 | <tr>
|
---|
| 13 | <th>Attribute</th>
|
---|
| 14 | <th>Values</th>
|
---|
| 15 | <th>Required</th>
|
---|
| 16 | </tr>
|
---|
| 17 | <tr>
|
---|
| 18 | <td>src</td>
|
---|
| 19 | <td>oot of source tree for JSP, ie, the document root for your weblogic server</td>
|
---|
| 20 | <td>Yes</td>
|
---|
| 21 | </tr>
|
---|
| 22 | <tr>
|
---|
| 23 | <td>
|
---|
| 24 | dest</td>
|
---|
| 25 | <td> root of destination directory, what you have set as WorkingDir in the weblogic properties</td>
|
---|
| 26 | <td>Yes</td>
|
---|
| 27 | </tr>
|
---|
| 28 | <tr>
|
---|
| 29 | <td>
|
---|
| 30 | package</td>
|
---|
| 31 | <td> start package name under which your JSP's would be compiled</td>
|
---|
| 32 | <td>Yes</td>
|
---|
| 33 | </tr>
|
---|
| 34 | <tr>
|
---|
| 35 | <td>
|
---|
| 36 | classpath</td>
|
---|
| 37 | <td>Class path to use when compiling jsp's</td>
|
---|
| 38 | <td>Yes</td>
|
---|
| 39 | </tr>
|
---|
| 40 | </tbody>
|
---|
| 41 | </table>
|
---|
| 42 | <p>
|
---|
| 43 | <br>
|
---|
| 44 |
|
---|
| 45 | A classpath should be set which contains the weblogic classes as well as all application classes<br>
|
---|
| 46 | referenced by the JSP. The system classpath is also appended when the jspc is called, so you may<br>
|
---|
| 47 | choose to put everything in the classpath while calling Ant. However, since presumably the JSP's will reference<br>
|
---|
| 48 | classes being build by Ant, it would be better to explicitly add the classpath in the task<br>
|
---|
| 49 | <br>
|
---|
| 50 | The task checks timestamps on the JSP's and the generated classes, and compiles<br>
|
---|
| 51 | only those files that have changed.<br>
|
---|
| 52 | <br>
|
---|
| 53 | It follows the weblogic naming convention of putting classes in<br>
|
---|
| 54 | <b> _dirName/_fileName.class for dirname/fileName.jsp </b><br>
|
---|
| 55 | <br>
|
---|
| 56 | </p>
|
---|
| 57 | <h3><br>
|
---|
| 58 | Example<br>
|
---|
| 59 | </h3>
|
---|
| 60 | <p>
|
---|
| 61 | <pre>
|
---|
| 62 | <target name="jspcompile" depends="compile">
|
---|
| 63 | <wljspc src="c:\\weblogic\\myserver\\public_html" dest="c:\\weblogic\\myserver\\serverclasses" package="myapp.jsp">
|
---|
| 64 | <classpath>
|
---|
| 65 | <pathelement location="${weblogic.classpath}"/>
|
---|
| 66 | <pathelement path="${compile.dest}"/>
|
---|
| 67 | </classpath>
|
---|
| 68 | </wljspc>
|
---|
| 69 | </target>
|
---|
| 70 | </pre>
|
---|
| 71 |
|
---|
| 72 | </p>
|
---|
| 73 |
|
---|
| 74 | <h3>Limitations</h3>
|
---|
| 75 | <ul>
|
---|
| 76 | <li>This works only on weblogic 4.5.1</li>
|
---|
| 77 | <li>It compiles the files thru the Classic compiler only.</li>
|
---|
| 78 | <li>Since it is my experience that weblogic jspc throws out of memory error on being given too
|
---|
| 79 | many files at one go, it is called multiple times with one jsp file each.</li>
|
---|
| 80 | </ul>
|
---|
| 81 | <hr>
|
---|
| 82 | <p align="center">Copyright © 2001-2002,2004 The Apache Software Foundation. All rights
|
---|
| 83 | Reserved.</p>
|
---|
| 84 | </body>
|
---|
| 85 | </html>
|
---|