tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Costin Manolache <>
Subject Proposal: Handler and ServletWrapper
Date Mon, 31 Jul 2000 22:23:11 GMT
History: ServletWrapper "encapsulate" a servlet. It knows how to
init and invoke the servlet, plus a number of other functions
( reloading, config, etc).

Handler is an attempt to rewrite ServletWrapper and make it simpler
and cleaner. It  acts as a base class, with only the core functionality
( init, invoke, interface with interceptors ).

ServletWrapper extends Handler to add servlet-specific code. We
need to create a JspWrapper and keep the Jsp-specific code in it
( it's one of the reasons ServletWrapper is so complex).

The proposal is to replace ServletWrapper with Handler in
interceptor and all other core components. I did this in
a private workspace and tomcat still works fine - it should
have only a minimal effect.

If you have Interceptors or code that uses ServletWrapper,
you'll just have to use Handler instead ( and maybe cast
to ServletWrapper if you need special functionality).

ServletWrapper ( and JspWrapper when added ) will live
in facade - that will also eliminate the need for  FacadeManager
( I'll send a separate mail when ready ).

To recap ( I sent few proposals last week ):

- ServletLoader - to be removed, Interceptor provide already
all the functionality

- ServerConnector - to be removed, Interceptor provide the
needed callbacks and support plus much more

- ServletWrapper - replaced with Handler in interfaces,
separate the jsp functionality and move it to tomcat.facade.

- ( later) FacadeManager - remove, provide a simpler
mechanism to access the internal objects ( for trusted
webapps )

- BufferedServletInput/OutputStream are not used
( both were rewritten as part of facade )

Please let me know if you are using any of those and
the changes would affect you.  I think 99% of the cases
will require minor changes in your code.

I'll wait few days before checking in ServletWrapper
changes, and I'll remove the other interfaces
this weekend ( if nobody provide a good reason not
to  and -1 ).


View raw message