Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@jakarta.apache.org Received: (qmail 71556 invoked by uid 500); 27 Mar 2001 00:32:56 -0000 Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: tomcat-dev@jakarta.apache.org Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 71547 invoked from network); 27 Mar 2001 00:32:56 -0000 X-Authentication-Warning: simona.wyn.org: costin owned process doing -bs Date: Mon, 26 Mar 2001 16:36:05 -0800 (PST) From: cmanolache@yahoo.com X-Sender: costin@simona.wyn.org To: "'tomcat-dev@jakarta.apache.org'" Subject: RE: TC3.3 Proposal: Refactoring org.apache.jasper.servlet In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N On Mon, 26 Mar 2001, Steve Downey wrote: > > 1. The jsp->java translator. > > > > 2. The java->class compiler > > > > 3. The Mangler ( managing name mappings ) > > > > 4. Runtime - that should be completely independent of all > > other pieces, > > since jasper-generated servlets should run without jasper ( as simple > > servlets ) > > > > 5. Interface with the serlvet container ( JspServlet, > > JspInterceptor and > > the associated classes). ( putting all other components togheter ) > > > > Layer 5 has to include the JspC/CommandLineXXX components, also. They have > to provide an environment that looks to the rest of the JSP compiler like a > web context, while actually interacting more closely with the filesystem. Yes. In fact a lot from JspInterceptor is inspired/derived from JspC. But the JspC is very special because it can be use to pre-compile applications - that would be great for special configurations or only the jsp runtime is included ( say an embeded tomcat, or a minimal environment). It should be possible ( after a bit of refactoring ) to create a mini distribution using only the core, a sub-set of the modules, jasper-runtime ( no xml parser or jasper converter or javac ), plus JspC-processed webapplications ( what's missing is a piece to serialize web.xml - for server.xml there is EmbededTomcat, and it shouldn't be difficult to automatically generate a java class that will have the same effect with reading web.xml - maybe using serialization ). I would bet on a result below 500K :-) ( most of the code is easy to port to J2ME, BTW - we just need volunteers :-). > Mangler needs some work, too. JspC and JspServlet have drifted in their > implementations. The bane of code sharing by cut and paste. Refactoring is the keyword :-) Merge what's duplicated, use the mistakes to define better interfaces between components. The mangler in 3.3 is slightly better ( forgive my lack of modesty here ), and I would also say the JspInterceptor is at least a simpler way to plug jasper ( compared with JspServlet ). Costin