Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@apache.org Received: (qmail 81700 invoked from network); 24 Apr 2002 18:29:25 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 24 Apr 2002 18:29:25 -0000 Received: (qmail 25747 invoked by uid 97); 24 Apr 2002 18:29:23 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-dev@jakarta.apache.org Received: (qmail 25731 invoked by uid 97); 24 Apr 2002 18:29:23 -0000 Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Developers List" Reply-To: "Tomcat Developers List" Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 25706 invoked from network); 24 Apr 2002 18:29:22 -0000 Date: Wed, 24 Apr 2002 11:29:21 -0700 (PDT) From: Kin-Man Chung Subject: Re: [PROPOSAL] jasper2 detection of compile time page include changes To: tomcat-dev@jakarta.apache.org Reply-to: Kin-Man Chung Message-id: <0GV300B3Z4R65H@mpkmail.eng.sun.com> MIME-version: 1.0 X-Mailer: dtmail 1.3.0 @(#)CDE Version 1.4.2 SunOS 5.8 sun4u sparc Content-type: TEXT/plain; charset=us-ascii Content-transfer-encoding: 7BIT Content-MD5: c6tNVFG4ipSXX/HvktNa4A== X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N +1 on the idea. With minor changes, we can also implement a compiler server that compiles out-of-date pages in the background thread. This would greatly improve the response time for accessing the pages, when recompilations are needed. > Date: Wed, 24 Apr 2002 10:52:51 -0500 > From: Glenn Nielsen > Subject: [PROPOSAL] jasper2 detection of compile time page include changes > To: tomcat-dev@jakarta.apache.org > MIME-version: 1.0 > Content-transfer-encoding: 7bit > X-Accept-Language: en > Delivered-to: mailing list tomcat-dev@jakarta.apache.org > Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm > X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N > List-Post: > List-Subscribe: > List-Unsubscribe: > List-Help: > List-Id: "Tomcat Developers List" > > A common problem Tomcat users have is that Jasper does not detect when > a compile time included file <%@include file="..."%> changes so that > it can recompile dependent JSP pages. This propsoal maps out a possible > solution for this. > > Create a new class (JspDependency) which is used to store mapping of JSP > pages to dependent compile time included files. This class will be > created for each web application context and the data it depends upon > serialized to a special file in the work directory on context stop, > and read from that file on context startup. Proposed filename is > JSP_DEPENDENCY.ser. > > Here is how this integrates into Jasper: > > On context start instantiate a JspDependency object and read in the > dependencies from JSP_DEPENDENCY.ser. If there are dependencies, > start a background thread which checks for changes in compile time > included files once each 5-15 minutes. Perhaps make this configurable. > If changes are detected, set flags for dependent JSP pages which are > affected. Using a thread to accomplish this rather than having JSP > Load do the dependency checks should reduce the request latency > overhead for detecting these changes. > > The JSP Load method will call a method in JspDependency to determine > whether the current page needs to be recompiled due to dependency changes. > This will just be a quick test of a boolean, actual dependency checks > are done by the background thread. > > The JSP page compiler will call a method in JspDependency to remove all > dependencies for the current JSP page on compile start, then call an > add method for each compile time include dependency found. > > After a JSP page compile has completed any changes to dependencies > are written back out to the JSP_DEPENDENCY.ser file. > > Comments or suggestions? > > 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: > For additional commands, e-mail: > -- To unsubscribe, e-mail: For additional commands, e-mail: