ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mehdi Bouzouina" <>
Subject Re: Has anyone ever precompiled JSP's for Tomcat?
Date Fri, 16 Aug 2002 01:41:08 GMT

Hi Hal,
The question is Has anyone ever precompiled JSP's for Tomcat? and not did
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 files,
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 web.xml
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 option.

here is the part of interest  from the script that i use: -d $ADMINWEBDIR/WEB-INF/classes -webinc $TOOLSDIR/$TEMPXML  -webapp
# 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 to
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: <>

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