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 2.4 kB

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