You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

wljspc.html 3.3 KiB

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