tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cmanola...@yahoo.com
Subject RE: TC3.3 Proposal: Refactoring org.apache.jasper.servlet
Date Tue, 27 Mar 2001 00:36:05 GMT
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


Mime
View raw message