| 1 |
<!DOCTYPE html> |
| 2 |
<!-- |
| 3 |
Licensed to the Apache Software Foundation (ASF) under one or more |
| 4 |
contributor license agreements. See the NOTICE file distributed with |
| 5 |
this work for additional information regarding copyright ownership. |
| 6 |
The ASF licenses this file to You under the Apache License, Version 2.0 |
| 7 |
(the "License"); you may not use this file except in compliance with |
| 8 |
the License. You may obtain a copy of the License at |
| 9 |
|
| 10 |
https://www.apache.org/licenses/LICENSE-2.0 |
| 11 |
|
| 12 |
Unless required by applicable law or agreed to in writing, software |
| 13 |
distributed under the License is distributed on an "AS IS" BASIS, |
| 14 |
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 |
See the License for the specific language governing permissions and |
| 16 |
limitations under the License. |
| 17 |
--> |
| 18 |
<html lang="en"> |
| 19 |
<head> |
| 20 |
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css"> |
| 21 |
<title>WLJSPC Task</title> |
| 22 |
</head> |
| 23 |
<body> |
| 24 |
<h1>wljspc</h1> |
| 25 |
<h3>Description</h3> |
| 26 |
<p>Class to precompile JSP's using WebLogic JSP compiler (<code>weblogic.jspc</code>)</p> |
| 27 |
<p>Tested only on WebLogic 4.5.1—NT 4.0 and Solaris 7 & 8</p> |
| 28 |
<h3>Parameters</h3> |
| 29 |
<table class="attr"> |
| 30 |
<thead> |
| 31 |
<tr> |
| 32 |
<th scope="col">Attribute</th> |
| 33 |
<th scope="col">Values</th> |
| 34 |
<th scope="col">Required</th> |
| 35 |
</tr> |
| 36 |
</thead> |
| 37 |
<tbody> |
| 38 |
<tr> |
| 39 |
<td>src</td> |
| 40 |
<td>root of source tree for JSP, ie, the document root for your WebLogic server</td> |
| 41 |
<td>Yes</td> |
| 42 |
</tr> |
| 43 |
<tr> |
| 44 |
<td>dest</td> |
| 45 |
<td>root of destination directory, what you have set as <code>WorkingDir</code> in the |
| 46 |
WebLogic properties</td> |
| 47 |
<td>Yes</td> |
| 48 |
</tr> |
| 49 |
<tr> |
| 50 |
<td>package</td> |
| 51 |
<td>start package name under which your JSPs would be compiled</td> |
| 52 |
<td>Yes</td> |
| 53 |
</tr> |
| 54 |
<tr> |
| 55 |
<td>classpath</td> |
| 56 |
<td>Class path to use when compiling JSPs</td> |
| 57 |
<td>Yes</td> |
| 58 |
</tr> |
| 59 |
</tbody> |
| 60 |
</table> |
| 61 |
<p>A classpath should be set which contains the WebLogic classes as well as all application classes |
| 62 |
referenced by JSP. The system classpath is also appended when the <code>jspc</code> is called, so |
| 63 |
you may choose to put everything in the classpath while calling Apache Ant. However, since |
| 64 |
presumably JSPs will reference classes being build by Ant, it would be better to explicitly add the |
| 65 |
classpath in the task.</p> |
| 66 |
<p>The task checks timestamps on the JSP's and the generated classes, and compiles only those files |
| 67 |
that have changed.</p> |
| 68 |
<p>It follows the WebLogic naming convention of putting classes in <samp>_dirName/_fileName.class |
| 69 |
for dirname/fileName.jsp</samp></p> |
| 70 |
<h3>Example</h3> |
| 71 |
<pre> |
| 72 |
<target name="jspcompile" depends="compile"> |
| 73 |
<wljspc src="c:\\weblogic\\myserver\\public_html" dest="c:\\weblogic\\myserver\\serverclasses" package="myapp.jsp"> |
| 74 |
<classpath> |
| 75 |
<pathelement location="${weblogic.classpath}"/> |
| 76 |
<pathelement path="${compile.dest}"/> |
| 77 |
</classpath> |
| 78 |
</wljspc> |
| 79 |
</target></pre> |
| 80 |
|
| 81 |
<h3>Limitations</h3> |
| 82 |
<ul> |
| 83 |
<li>This works only on WebLogic 4.5.1</li> |
| 84 |
<li>It compiles the files through the Classic compiler only.</li> |
| 85 |
<li>Since it is my experience that <code>weblogic.jspc</code> throws out of memory error on being |
| 86 |
given too many files at one go, it is called multiple times with one JSP file each.</li> |
| 87 |
</ul> |
| 88 |
|
| 89 |
</body> |
| 90 |
</html> |