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