tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Remy Maucherat <>
Subject Re: Jasper 2 Synchronized JSP compiles
Date Wed, 04 Dec 2002 20:01:52 GMT
Glenn Nielsen wrote:
> I have some ideas on how invoking the javac compiler for compiling JSP 
> pages can be
> improved.  Currently Jasper 2 uses ant to do compiles from within Tomcat 
> which are
> synchronized.
> There are currently several problems.
> 1. The known javac memory leak.
> 2. JSP page compiles are synchronized.
> 3. Jikes currently can't be configured for windows because the windows 
> build of
>    jikes doesn't support -encoding.
> 4. We may be getting some bug reports related to this problem noted in 
> the Ant
>    documentation for the javac task:
> Windows Note:When the modern compiler is used in unforked mode on 
> Windows, it locks up the files present in the classpath of the <javac> 
> task, and does not release them. The side effect of this is that you 
> will not be able to delete or move those files later on in the build. 
> The workaround is to fork when invoking the compiler.
> Recommendation:
> Change Jasper 2 so that it tells ant to fork the javac compile.  This 
> should remove the need
> to synchronize the compiles.  It will also move java compilation outside 
> of the JVM process
> Tomcat is running in saving JVM heap memory and reducing GC overhead 
> from objects created for
> JSP compiles.  This could be done by just adding another parameter 
> called "fork" to the
> JspServlet paramters. If fork=true ant forks the javac compile and no 
> synchronization is done.
> The default for fork would be false.

+1. The compilation is not completely thread safe for concurrent 
requests on the same JSP, BTW (and it's quite complex to make it thread 
safe - I tried).


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

View raw message