ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hal Hildebrand \(web\)" <Hal.Hildebr...@hellblazer.com>
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" <mbouzoui@cisco.com>

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
servlet.

To do this, you need:
jspc.sh
jasper.sh
setclasspath.sh
and of course the catalina jar files.

All those files are part of the catalina distribution.


To have jasper (jspc.sh) 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:

jspc.sh -d $ADMINWEBDIR/WEB-INF/classes -webinc
TOOLSDIR/$TEMPXML  -webapp
/vob/cape/capeUIs/AdminUI/adminui
# 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
sed "3 r $TOOLSDIR/$TEMPXML"  $SOURCEXML > $ADMINWEBDIR/WEB-INF/web.xml
rm $TOOLSDIR/$TEMPXML


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

-------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.

-Hal
______
All your data-base are belong to us
www.hellblazer.com



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

.


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


Mime
View raw message