+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 <[EMAIL PROTECTED]> > Subject: [PROPOSAL] jasper2 detection of compile time page include changes > To: [EMAIL PROTECTED] > MIME-version: 1.0 > Content-transfer-encoding: 7bit > X-Accept-Language: en > Delivered-to: mailing list [EMAIL PROTECTED] > Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm > X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N > List-Post: <mailto:[EMAIL PROTECTED]> > List-Subscribe: <mailto:[EMAIL PROTECTED]> > List-Unsubscribe: <mailto:[EMAIL PROTECTED]> > List-Help: <mailto:[EMAIL PROTECTED]> > List-Id: "Tomcat Developers List" <tomcat-dev.jakarta.apache.org> > > 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 [EMAIL PROTECTED] | /* Spelin donut madder | > MOREnet System Programming | * if iz ina coment. | > Missouri Research and Education Network | */ | > ---------------------------------------------------------------------- > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>