source: other-projects/trunk/realistic-books/packages/AntInstaller/web/manual1.6.2/manual/OptionalTasks/wljspc.html@ 19253

Last change on this file since 19253 was 19253, checked in by davidb, 15 years ago

Establishing a source code repository for Veronica's Realistic Book's software

File size: 2.6 KB
Line 
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>
8Tested 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>
24dest</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>
30package</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>
36classpath</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
45A classpath should be set which contains the weblogic classes as well as all application classes<br>
46referenced by the JSP. The system classpath is also appended when the jspc is called, so you may<br>
47choose to put everything in the classpath while calling Ant. However, since presumably the JSP's will reference<br>
48classes being build by Ant, it would be better to explicitly add the classpath in the task<br>
49<br>
50The task checks timestamps on the JSP's and the generated classes, and compiles<br>
51only those files that have changed.<br>
52<br>
53It 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>
58Example<br>
59</h3>
60<p>
61<pre>
62&lt;target name="jspcompile" depends="compile"&gt;
63 &lt;wljspc src="c:\\weblogic\\myserver\\public_html" dest="c:\\weblogic\\myserver\\serverclasses" package="myapp.jsp"&gt
64 &lt;classpath&gt;
65 &lt;pathelement location="${weblogic.classpath}"/&gt;
66 &lt;pathelement path="${compile.dest}"/&gt;
67 &lt;/classpath&gt;
68 &lt;/wljspc&gt;
69&lt;/target&gt;
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
79many files at one go, it is called multiple times with one jsp file each.</li>
80</ul>
81<hr>
82<p align="center">Copyright &copy; 2001-2002,2004 The Apache Software Foundation. All rights
83Reserved.</p>
84</body>
85</html>
Note: See TracBrowser for help on using the repository browser.