I think the Resin 3.0 JspCompiler needs the JSP files as arguments. We have 
accomplished that in this way:


    <!-- Definition of JSP files that should be precompiled to servlets -->
    <fileset dir="${build.dir}" id="jsp.precompile.fileset">
      <include name="**/*.jsp"/>
    </fileset>

    <!-- Convert fileset to single property, separated by space -->
    <pathconvert pathsep=" "
                 property="jsp.precompile.files"
                 refid="jsp.precompile.fileset">
    </pathconvert>


    <echo>Batch Precompile of JSP Files</echo>
    <java classname="com.caucho.jsp.JspCompiler"
          classpathref="resin.jspc.classpath" fork="true" failonerror="true">
      <sysproperty key="java.util.logging.config.file" 
value="${jsp.logging.properties}"/>
      <arg value="-app-dir"/>
      <arg value="${build.dir}"/>
      <arg line="${jsp.precompile.files}"/>
    </java>


Please note, that this might fail on Windows Platform as there is a limitation 
of the argument length. But it works on our Unix Platform.


Regards,
Steffen



-----Urspr√ľngliche Nachricht-----
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von rafael.munoz
Gesendet: Montag, 5. Mai 2008 15:17
An: resin-interest@caucho.com
Betreff: [Resin-interest] Ant and JSPCompiler


Hi

I'm trying to precompile my JSPs before the deploy phase, integrating this 
precompilation in my ANT build script.

I'm using Resin 3.0.19 so I can't use the new resin-ant.jar but I think that 
this ANT target should work:

<target name="precompile-jsp" description="precompile jsp">
   <echo message="precompiling JSPs: app-dir=${home.war}"/>
   <java classname="com.caucho.jsp.JspCompiler" fork="true" >
      <classpath refid="resin.classpath" />
      <arg line="-app-dir ${home.war}" />
   </java>
</target>

But unfortunately it doesn't work: this generate the work and tmp directory but 
they're empty.

I have try passing a JSP and the JSP is precompiled without problem:
<target name="precompile-jsp" description="precompile jsp">
   <echo message="precompiling JSPs: app-dir=${home.war}"/>
   <java classname="com.caucho.jsp.JspCompiler" fork="true" >
      <classpath refid="resin.classpath" />
      <arg line="-app-dir ${home.war}" />
      <arg line="${home.war}/index.jsp" />
   </java>
</target>

So my question is: have I to pass ALL my JSPs to JSPCompiler? Can't I just 
point to the root of my web app and just have all my JSP precompiled?
--
View this message in context: 
http://www.nabble.com/Ant-and-JSPCompiler-tp17061443p17061443.html
Sent from the Resin mailing list archive at Nabble.com.



_______________________________________________
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest




_______________________________________________
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest

Reply via email to