(8) 预编译JSP文件,可选择基于Tomcat或是Oracle Application Server
<!--// for Tomcat //-->
<target name="jsp_src_generate" depends="src_compile">
<taskdef classname="org.apache.jasper.JspC" name="jasper2">
<classpath refid="CLASSPATH"/>
</taskdef>
<jasper2 validateXml="false"
verbose="9"
uriroot="${dir.project.web_module}"
outputDir="${dir.project.compile.jspcache}"
webXmlFragment="${dir.project.compile.jspcache}/generated-web.xml" />
</target>
<!--// for OC4J 9.0.4
<target name="jsp_src_generate" depends="src_compile">
<java classname="oracle.jsp.tools.Jspc" fork="yes" failonerror="true">
<classpath refid="CLASSPATH"/>
<arg line="-extend com.orionserver.http.OrionHttpJspPage"/>
<arg line="-srcdir ${dir.project.compile.jspcache}"/>
<arg line="-appRoot ${dir.project.web_module}"/>
<arg line="-noCompile"/>
<arg line="-debug"/>
<arg line="-verbose"/>
<arg line="${dir.project.web}/*.jsp"/>
</java>
</target>
//-->
<target name="jsp_src_compile">
<javac srcdir="${dir.project.compile.jspcache}"
destdir="${dir.project.compile.jspcache}"
encoding="${opt.compile.encoding}"
source="${opt.compile.source}"
target="${opt.compile.source}"
deprecation="${opt.compile.deprecation}"
debug="${opt.compile.debug}"
optimize="{opt.compile.optimize}" >
<classpath refid="CLASSPATH"/>
<include name="**"/>
</javac>
</target>
<target name="jsp_precompile" depends="src_compile, jsp_src_generate, jsp_src_compile" />