Hi, there,

Currently the cactus source is a little confusing. I think the main reason
is that cactus aims to support _all_ servlet specs.

Take an example: for HttpServletRequestWrapper, in order to support
servlet-api 2.2, you must implement the wrapper yourselves, because
HttpServletWrapper does not exist in servlet-api 2.2. What you've done is to
provide an abstract wrapper, and extend it to create a concrete wrapper _for
servlet 2.2_.

Then servlet-api 2.3 arrives with some new methods added to
HttpServletRequest. The concrete servlet 2.2 wrapper does no longer compile
because it does implement _all_ the methods. So you've provided another
concrete, compilable wrapper by extending the abstract 2.2 wrapper.

Then servlet-api 2.4 arrives with some new methods and new types added to
HttpServletRequest. You have to extend the abstract 2.2 wrapper to make an
abstract 2.4 wrapper (for future use), and extend the 2.4 wrapper to create
a concrete one.

Then....

So, i am thinking, why not separate the j2ee-12 implementation from cactus?
That may make things much easier. You may use HttpServletRequestWrapper (in
servlet 2.3) to implement specific cactus wrapper. If in the future a new
servlet spec is out, you do no longer need to provide an abstract wrapper:
what to do is just to extend HttpServletRequestWrapper and implement the
concrete cactus wrapper.

I do not mean to abandon servlet 2.2. Support of 2.2 may still be maintained
but you may choose not to base your future development on it.

I would like to hear your opinions.

Regards.

--

ZHENG Zhong

1 Avenue Alphand
75116 Paris, France
+33 6 76 80 45 90

Reply via email to