ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hal Hildebrand \(web\)" <>
Subject Re: Has anyone ever precompiled JSP's for Tomcat?
Date Fri, 16 Aug 2002 02:01:24 GMT
Many thanks.

This is pretty much what I do.  Rather than invoking it via jspc.bat/sh,
I do it through the Java invocation of the JSPC class.  Everything
works - at least it generates all the classes for the JSPs.  I compile
them - they compile without a peep.  However, when I view the pages, all
I get is nothing but blanks.  I'm generating the web.xml for now, rather
than an include.

I'll investigate further to see what's up.

At least I know that it is possible...

Again, thanks.

----- Original Message -----
From: "Mehdi Bouzouina" <>

Hi Hal,
The question is Has anyone ever precompiled JSP's for Tomcat? and not
anyone get JSPC to work, i can help you with the pre-compilation
I have too given up on the JSPC task (for the short term), but i do
pre-compile the JSPs for catalina (4.0.4) here's what i do:

Use jasper to precompile the JSPs, that will give you java servlet
then compile the java files, that will give you compiled classes.

Those classes need to go in the WEB-INF/classes directory in their
respective package directory.
The one key thing is that you need jasper to either generate a full
for you or a partial
one to add to your web.xml. The xml file will be the mapping of JSP to

To do this, you need:
and of course the catalina jar files.

All those files are part of the catalina distribution.

To have jasper ( generate the web.xml use:

 -webinc <file>  Creates partial servlet mapings for the -webapp option
 -webxml <file>  Creates a complete web.xml when using the -webapp

here is the part of interest  from the script that i use: -d $ADMINWEBDIR/WEB-INF/classes -webinc
# Compile the classes
$JAVA_HOME/bin/javac -nowarn -classpath  $DAMBUILD/lib/damServer
jar:$DAMBUILD/lib/catalina.jar $ADMINWEBDIR/WEB-INF/classes/*.java
# Clean after ourselves part I
rm $ADMINWEBDIR/WEB-INF/classes/*.java

Let me know if you need more help, i'm hoping someday we can get around
making the jspc task do the work.

-------Original Message-------

From: Ant Users List
Date: Thursday, August 15, 2002 09:06:10 PM
To: Ant Users List
Subject: Has anyone ever precompiled JSP's for Tomcat?

I'm at the point of pulling my hair out. I can't find any examples on
how to do this.

The <jspc> task seems to be completely broken, so I'm reduced to doing
this manually. When I do this, I get the classes, but only blank pages!
Extremely bizarre. The web.xml which is generated looks correct,
and it's not throwing errors saying it can't find the compiled jsps.

Any pointers/help would be greatly appreciated.

All your data-base are belong to us

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


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

View raw message