ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From johannes.fi...@fwd.at
Subject Re: Tomcat JSPC Precompile using Ant - unique jsp name problem
Date Thu, 03 Apr 2003 20:48:24 GMT
Hi Rob,

I have the following config:
*) ant 1.5.2
*) catalina-ant.jar copied from tomcat-4.1.24\server\catalina-ant.jar

If I compile the jsps produced by jasper2, I still get the following 
error:
compile:
    [javac] Compiling 12 source files to E:\build\WEB-INF\classes
    [javac] E:\esvdevelop\devapp\forms\src\kbgverzicht\final_jsp.java:11: 
duplicate class: org.apache.jsp.final_jsp
    [javac] public class final_jsp extends HttpJspBase {

I think the package/class name is causing the trouble. Isn't there an 
option to include the directory name inside the class/package name? 
Wouldn't this resolve the trouble easily?

thx alot
Johannes




"Rob Moore" <robmoore@yahoo.com> 
Sent by: news <news@main.gmane.org>
03.04.2003 16:42
Please respond to
"Ant Users List" <user@ant.apache.org>


To
user@ant.apache.org
cc

Subject
Re: Tomcat JSPC Precompile using Ant - unique jsp name problem






FWIW, I tried using the Ant task included with 4.1.24 and it works very
well.

Take a look at:

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jasper/docs/api/org/apache/j

asper/JspC.html

It does have some drawbacks (like you can't use classpathref, apparently),
but it is the closest I've found to getting the desired result. At any 
rate,
it behaves well WRT packages.

P.S. Here's the relevant section from the docs:

 <taskdef classname="org.apache.jasper.JspC" name="jasper2" >
        <classpath>
            <pathelement location="${java.home}/../lib/tools.jar"/>
            <fileset dir="${ENV.CATALINA_HOME}/server/lib">
                <include name="*.jar"/>
            </fileset>
            <fileset dir="${ENV.CATALINA_HOME}/common/lib">
                <include name="*.jar"/>
            </fileset>
            <path refid="myjars"/>
         </classpath>
    </taskdef>

    <jasper2 verbose="0"
             package="my.package"
             uriroot="${webapps.dir}/${webapp.name}"
             webXmlFragment="${build.dir}/generated_web.xml"
 outputDir="${webapp.dir}/${webapp.name}/WEB-INF/src/my/package"
/>




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message