Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I use the <a href="http://tomcat.apache.org/tomcat-6.0-doc/jasper-howto.html" rel="nofollow noreferrer">Tomcat jasper ANT tasks</a> in my project, which precompile the JSPs into servlets and add the new servlet mappings to the original web.xml. In the DEV builds, just skip this step and deploy the JSPs without pre-compile and modification of the web.xml.</p> <pre><code> &lt;?xml version="1.0"?&gt; &lt;project name="jspc" basedir="." default="all"&gt; &lt;import file="${build.appserver.home}/bin/catalina-tasks.xml"/&gt; &lt;target name="all" depends="jspc,compile"&gt;&lt;/target&gt; &lt;target name="jspc"&gt; &lt;jasper validateXml="false" uriroot="${build.war.dir}" webXmlFragment="${build.war.dir}/WEB-INF/generated_web.xml" addWebXmlMappings="true" outputDir="${build.src.dir}" /&gt; &lt;/target&gt; &lt;target name="compile"&gt; &lt;javac destdir="${build.dir}/classes" srcdir="${build.src.dir}" optimize="on" debug="off" failonerror="true" source="1.5" target="1.5" excludes="**/*.smap"&gt; &lt;classpath&gt; &lt;fileset dir="${build.war.dir}/WEB-INF/classes"&gt; &lt;include name="*.class" /&gt; &lt;/fileset&gt; &lt;fileset dir="${build.war.lib.dir}"&gt; &lt;include name="*.jar" /&gt; &lt;/fileset&gt; &lt;fileset dir="${build.appserver.home}/lib"&gt; &lt;include name="*.jar" /&gt; &lt;/fileset&gt; &lt;fileset dir="${build.appserver.home}/bin"&gt; &lt;include name="*.jar"/&gt; &lt;/fileset&gt; &lt;/classpath&gt; &lt;include name="**" /&gt; &lt;exclude name="tags/**"/&gt; &lt;/javac&gt; &lt;/target&gt; &lt;target name="clean"&gt; &lt;delete&gt; &lt;fileset dir="${build.src.dir}"/&gt; &lt;fileset dir="${build.dir}/classes/org/apache/jsp"/&gt; &lt;/delete&gt; &lt;/target&gt; &lt;/project&gt; </code></pre> <p>If you already have the JSP compilation working and just want to merge the web.xml files, a simple XSLT could be written to add selected elements(such as the servlet mappings) from the newly generated web,xml into your original.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload