>>>>> "Eric" == Eric Lewis <[EMAIL PROTECTED]> writes:
Eric> Hi all
Eric> Since compiling a JSP page means a big overhead for the server, has anyone
Eric> ever tried to compile them on a development server and then deploy them to a
Eric> production server? Ideally, Tomcat should compare the timestamp of the JSP
Eric> and the .class and take the latter...
As Hans replied, most servlet containers provide a tool for precompiling JSP
pages into servlets.
Each one of them does about the same thing, with minor differences. The basic
idea is that you generate a servlet class from the JSP page and compile the
generated servlet. You also have to build a fragment of the "web.xml" file
representing the mappings from "*.jsp" to your new servlet classes, and either
use XML external entities to "include" that fragment in your base "web.xml"
file, or use XSLT to merge the two files. I prefer the latter approach (partly
because I could never get the XML external entity solution to work in Tomcat).
I've looked at a few different servlet containers, and Tomcat is the only one
that I know of that generates the fragment to include in the "web.xml" file.
However, it's not difficult to generate that fragment with a shell or perl
script.
And don't forget to "exclude" your JSP pages from the final WAR file, as you
don't need them anymore (and as proof your process is working).
--
===================================================================
David M. Karr ; Java/J2EE/XML/Unix/C++
[EMAIL PROTECTED]
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>