tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Glenn Nielsen <>
Subject Re: [VOTE] Proposed jspc refactoring
Date Fri, 08 Nov 2002 01:33:00 GMT
Remy Maucherat wrote:
> Hi,
> jspc is IMO overly complex, with many features nobody knows how to use, 
> and nobody cares to test (hence sometimes some of them are randomly 
> broken during Jasper refactorings).
> I propose that:
> - In Tomcat 5, all jspc options are removed, in favor of allowing only 
> the webapp mode (with its relevant options). This webapp mode would 
> generate code and classes which should be deployed in the work 
> directory, exactly the same as if they were dynamically compiled by 
> Jasper (which has the big advantage of using only one big operation mode 
> for everything). Single file mode is IMO useless (dynamic compilation 
> works fine).
> - In Tomcat 4.1, the options will stay in for compatibility, but the 
> usage help will be modified to be the same as Tomcat 5.
> It has to be noted that:
> - The JSP runtime is now very efficient. The old webapp mode (with its 
> static web.xml) is a hack (and a 100% proprietary one at that).
> - Precompilation should only occur at webapp deployment time in the 
> general case (the generated code is closely tied to the Jasper runtime 
> release).
> - Additional features could be added to the manager servlet to, for 
> example, cause precompilation of the deployed webapp in a separate process.
> - I am -1 to returning to the old "webapp" option behavior (ie, the 
> generated files should by default be deployed in the work directory, not 
> /WEB-INF/classes).
> <ballot>
> +1 [ ] Remove the options
> -1 [ ] Do not remove the options
> </ballot>
> Note: Users may vote, but only committers have binding votes.
> Remy

I agree that JSPC needs to be simplified and that the webapp mode should
be retained.  But the webapp mode should allow for a war file to be generated
which is self contained including the precompiled JSP classses.  And for the
generated war to be able to run from the war file with no need to unpack it.

Also I agree that this feature is a proprietary feature of Tomcat and we
should no longer try to generate a war that can be deployed in any container.

There may be a way to do this:

Put the generated JSP class files in a /WEB-INF/jspwork/ directory.  This work
directory would only be used by jasper for loading jsp pages, the normal work
directory would still be used for all other things.

Add the "jspwork" attribute to the DefaultContext and Context config elements.
This attribute would specify the directory path within the war file to use for
loading the JSP page classes from by Jasper.

This would allow JSPC to create a war file which was self contained including
the precompiled JSP page classes and be runnable directly from the war or
unpacked into a directory.

+1 if we modify Tomcat & Jasper to support precompiled JSP pages running from a
self contained war file.



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

View raw message