You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Johann Uhrmann <jo...@xpecto.com> on 2003/08/18 10:55:30 UTC
Jasper2 ant task questions
Hello,
there a some strange phenomena in my build with the jasper2 ant task.
The following snippet is used to compile the JavaServer Pages:
<path id="jasper2" >
<pathelement location="${java.home}/../lib/tools.jar"/>
<fileset dir="${catalina.home}/server/lib">
<include name="*.jar"/>
<exclude name="optional.jar" />
<exclude name="*ant.jar" />
</fileset>
<fileset dir="${catalina.home}/common/lib">
<include name="*.jar"/>
<exclude name="optional.jar" />
<exclude name="*ant.jar" />
</fileset>
</path>
<taskdef classname="org.apache.jasper.JspC" name="jasper2">
<classpath refid="jasper2" />
</taskdef>
<property name="jasper2.classpath" refid="compile.classpath"/>
<echo message="${jasper2.classpath}" />
<jasper2
validateXml="false"
uriroot="${temp.home}"
webXmlFragment="${temp.home}/WEB-INF/generated_web.xml"
outputDir="${temp.home}"
classpath="${jasper2.classpath}"
/>
Well, those phenomena occur:
- The task class cannot be found. Running ant with -verbose shows that
the class javax.servlet.ServletContext cannot be found.
The strange thing is that "jasper2" contains the path to servlet.jar
and putting the very same jar file on the CLASSPATH environment fixes
the problem.
- During the jasper2 run, the class
org.apache.struts.util.PropertyMessageResourcesFactory
cannot be found. However, the according jar file is on
"jasper2.classpath".
Adding the contents of "jasper2.classpath" to the CLASSPATH
environment variable fixes the problem again.
It seems like not all jar files on "jasper2" and "jasper2.classpath" are
inspected by the class loader. Is there a size limit for the classpath
in ant/jasper2 or even jdk1.4.1?
The class pathes are quite huge (approx. 4kByte).
Does the order of the jar files matter?
Can someone give me a hint how to run this without changing the
CLASSPATH environment every time?
Thank You very much,
Johann Uhrmann
P.S.:
Can jasper2 be told to skip certain jsp files. Those used for static
includes result in broken java-classes (classes that cannot be compiled).
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org