0 Replies Latest reply on Sep 27, 2004 2:51 PM by Michal Kalanski

    JSP precompilation of *.tag

    Michal Kalanski Newbie

      Hello All

      I want to precompile my web application with JSPC ant task:

      <target name="precompile_jsp" depends="init">
       <taskdef classname="org.apache.jasper.JspC" name="jasper2">
       <classpath id="jspc.classpath">
       <pathelement location="${java.home}/../lib/tools.jar" />
       <pathelement path="classes" />
       <fileset dir="${jboss.home}/server/default/deploy/jbossweb-tomcat50.sar">
       <include name="*.jar" />
       </fileset>
       <fileset dir="${jboss.home}/server/default/lib">
       <include name="*.jar" />
       </fileset>
       <fileset dir="${basedir}/lib">
       <include name="**/*.jar" />
       </fileset>
       </classpath>
       </taskdef>
       <jasper2
       addwebxmlmappings="true"
       verbose="3"
       javaencoding="ISO-8859-2"
       validateXml="false"
       uriroot="${basedir}/WebRoot"
       webXmlFragment="${main.dist.dir}/generated_web.xml"
       outputDir="${basedir}/jsp_compiled" />
       <javac verbose="true" fork="true"
       destdir="WebRoot/WEB-INF/classes"
       encoding="ISO-8859-2"
       optimize="off"
       debug="on"
       failonerror="true"
       srcdir="jsp_compiled" excludes="jsp_compiled/org/apache/jsp/tag/*.java,**/*.smap">
       <classpath id="javac.classpath">
       <pathelement location="${java.home}/../lib/tools.jar" />
       <pathelement path="jsp_compiled" />
       <pathelement path="classes" />
       <fileset dir="${jboss.home}/server/default/deploy/jbossweb-tomcat50.sar">
       <include name="*.jar" />
       </fileset>
       <fileset dir="${jboss.home}/server/default/lib">
       <include name="*.jar" />
       </fileset>
       <fileset dir="${basedir}/lib">
       <include name="**/*.jar" />
       </fileset>
       </classpath>
       <include name="**" />
       <exclude name="tags/**" />
       </javac>

      My application consist of some jsp and *.tag files.
      I put compiled jsp's and tag's to WEB-INF/classes directory and I deploy application.
      It is working OK.
      When I change any jsp file and deploy it again (precompile) ,it is working OK, but when I made any changes in my *.tag file JSPC precompiler don't see it and don't compile tag file.

      What am I doing wrong ?
      Is it posible to precompile tag files ?