整理一个ANT在J2EE项目中的应用,含预编译JSP和打包WAR/EAR文件![7]

[入库:2006年2月23日] [更新:2007年3月24日]

本文简介:


(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" />

本文关键:整理一个ANT在J2EE项目中的应用,含预编译JSP和打包WAR/EAR文件!
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top