ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Johannes Fiala" <>
Subject SOLVED: Re: Tomcat JSPC Precompile using Ant - unique jsp name problem
Date Sat, 03 May 2003 11:07:52 GMT
I'm happy to report that this issue has been resolved with TC 4.1.24:

Hi there,

I just want to let you know that the bug of JSPC: generating duplicate 
names of classes, which causes compile to fail has been resolved with 
Tomcat 4.1.24. The reason why I didn't notice immediately was that it 
didn't overwrite my old generated source-files. After deleting them, 
Jasper generated them from scratch and now it rocks!

JSPC will now generate the jsps with a new package name:
package directory.subdirectory....;
instead of
package org.apache.jsp;

This bugfix helps a lot, as my JSPs now perform best as they can, 
immediately after deploying the app.


Johannes Fiala/Johannes Fiala
07.04.2003 21:35

"Ant Users List" <>

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

Hi Steve,

Thx alot for posting your configuration details, unfortunately it hasn't 
worked out yet for me and I have to repost in this issue!
I tried using JSPC now, but it seems that the same problem happens with 
the webapp option activated. It seems the webapp option only helps if 
duplicate names occur in different webapps, not within the same webapp 

jspc task definition:
<target name="jspc">

    <jspc  compiler="jasper41" destdir="src" uriroot="/jsp"
        webinc="${basedir}/webinc.xml" >
        <classpath id="jspc.classpath">
        <pathelement location="${java.home}/../lib/tools.jar"/>
        <fileset dir="${catalina.home}/server/lib">
          <include name="*.jar"/>
        <fileset dir="${catalina.home}/common/lib">
          <include name="*.jar"/>
        <!-- include all JARs in lib-directory -->
        <fileset dir="${build.home}/WEB-INF/lib/">
                <include name="*.jar"/>


           <webapp  basedir="jsp" />



and here are my compile results:
    [javac] Compiling 16 source files to 
    [javac] E:\develop\forms\src\kbgverzicht\ duplicate 
class: org.apache.jsp.final_jsp
    [javac] public class final_jsp extends HttpJspBase {

Since the problem always occurs during compile, maybe should I use 
different compiler options? 
<javac srcdir="${src.home}"
       (I also tried: fork="yes" / include="mypath1" / exclude="mypath2") 
*) I tried setting fork to "yes", but it didn't help. (since all *.java 
are still compiled together at a time).
*) Using "include="mydir/"" works, but I'd have to specify each directory 
separately and define a separate JSP-Task for this, which would be quite 

*) Is there any standard way to loop through all subdirectories and 
compile each subdirectory separately (that would solve the problem)? Or do 
I have to write a custom task for this (which would be a general bugfix of 
the whole problem as it appears to me)?

thx alot

"Steve Loughran" <> 
07.04.2003 08:07
Please respond to
"Ant Users List" <>

"Ant Users List" <>

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

----- Original Message -----
From: <>
To: "Ant Users List" <>
Sent: Sunday, April 06, 2003 13:54
Subject: Re: Tomcat JSPC Precompile using Ant - unique jsp name problem

> Hi Steve,
> Does the jspc-task also work for compiling JSPs using Jasper (and solve
> the problem of similarly named JSPs)?

no, it has the same bug (which is part of jasper) unless you use the
<webapp> feature

> If yes, could you post a brief sample of your working ant 

I already have

> > <jspc destdir="build/jspc" compiler="jasper41" >
> >   <webapp basedir="src/webapp" />
> > </jspc>

To unsubscribe, e-mail:
For additional commands, e-mail:

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