tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Abraham Fathman" <afath...@one.net>
Subject RE: Jasper2 background compilation and compile time include checks implemented
Date Tue, 07 May 2002 02:20:26 GMT
Glenn,

Thanks a lot for adding the '<%@ include file' support! I just signed up
last night to be on this mailing list because I was going to start this.

- Abe

-----Original Message-----
From: glenn@zathras.earthdome.org [mailto:glenn@zathras.earthdome.org]
On Behalf Of Glenn Nielsen
Sent: Monday, May 06, 2002 12:03 PM
To: tomcat-dev@jakarta.apache.org
Subject: Jasper2 background compilation and compile time include checks
implemented


I have committed the changes to Jasper 2 to implement background
compilation and checking for outdated compile time included files.

Here is a summary of the changes for those of you who do not get the CVS
commit emails:

Reduced amount of code within the JspServlet synchronized block, should
improve performance slightly.

Added ability to remove the JspServletWrapper and the class file for its
JSP when a JSP file no longer exists.

Added removal of JSP java source file to
Compiler.removeGeneratedFiles().

Moved the normalizing of the java class output directory
from JspServletWrapper to JspEngineContext where it belongs.

Moved obtaining the parentClassLoader, codeSource, classpath, and
permissionCollection from the JspServlet to JspRuntimeContext.

The servlet init method for the JSP was not getting called on the first
load of the JSP page if the page were already compiled. This has been
fixed.

Refactored the code in JspServletWrapper for loadJSP to remove nested
try/catch blocks and the overhead from several method calls.

The outdated check for recompile now includes checking of compile time
included files using <%@ include file="..." %>. The data about what
pages were compile time includes is generated as part of the Servlet
code for the JSP.  This is alot cleaner than my original proposal of
storing the data in a separate file.

Added the JspRuntimeContext background thread. It checks for changes to
the JSP file and compile time included files.  If changed, it recompiles
the JSP in the background. This will allow the previous compiled JSP
class to be used until the page has been recompiled and the new class is
available.  This will remove any request latency seen due to JSP
recompiles. The background thread is only started if the web application
context is a directory, reloading is enabled, and development is false.
If the webapp is running directly from a war file there is no need to
check for recompiles.

Added two Jasper init parameters:

    development - set to true to force an outdated check on
                  each page request instead of using background
                  thread.

    checkInterval - Number of seconds background thread should
                    wait before checking if JSP's are out dated.

Passes all jsp watchdog tests except for the broken test case.

Regards,

Glenn
 
----------------------------------------------------------------------
Glenn Nielsen             glenn@more.net | /* Spelin donut madder    |
MOREnet System Programming               |  * if iz ina coment.      |
Missouri Research and Education Network  |  */                       |
----------------------------------------------------------------------

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



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


Mime
View raw message