You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Henri Yandell <fl...@gmail.com> on 2006/04/11 10:04:03 UTC

[fileupload] Compile against Servlet 2.4 spec?

At work I compile FileUpload against the Servlet 2.4 spec. This means
a patch so that the mock classes in the unit test will successfully
extend the 2.4 super classes.

Any interest in this being applied to fileupload?

Hen

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: [fileupload] Compile against Servlet 2.4 spec?

Posted by Craig McClanahan <cr...@apache.org>.
On 4/11/06, Martin Cooper <ma...@apache.org> wrote:
>
> On 4/11/06, Henri Yandell <fl...@gmail.com> wrote:
> >
> > At work I compile FileUpload against the Servlet 2.4 spec. This means
> > a patch so that the mock classes in the unit test will successfully
> > extend the 2.4 super classes.
> >
> > Any interest in this being applied to fileupload?
>
>
> Can you say more about the nature of the changes? I guess as long as the
> end
> result still allows FileUpload to be built and tested against the Servlet
> 2.3 API, per the Maven POM, I'm not averse to enabling it to be built and
> tested against the Servlet 2.4 API as well.


Servlet 2.4 added a few additional passthrough methods on the wrapper class
that would need to be implemented in such a way that they use reflection to
call through if the method exists, or throw some sort of exception if they
don't.  I'm +1 on such a change.

The original theory on interfaces like HttpServletRequest was that you could
break backwards compatibility with a reasonable amount of impunity, since
this was something that only container vendors had to deal with.  That went
away with the introduction of HttpServletRequestWrapper in Servlet 2.3,
which leaves all of us that rely on that interface being subject to changes
that we have to deal with.

--
> Martin Cooper


Craig


Hen
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: commons-dev-help@jakarta.apache.org
> >
> >
>
>

Re: [fileupload] Compile against Servlet 2.4 spec?

Posted by Martin Cooper <ma...@apache.org>.
On 4/12/06, Henri Yandell <fl...@gmail.com> wrote:
>
> On 4/11/06, Martin Cooper <ma...@apache.org> wrote:
> > On 4/11/06, Henri Yandell <fl...@gmail.com> wrote:
> > >
> > > At work I compile FileUpload against the Servlet 2.4 spec. This means
> > > a patch so that the mock classes in the unit test will successfully
> > > extend the 2.4 super classes.
> > >
> > > Any interest in this being applied to fileupload?
> >
> >
> > Can you say more about the nature of the changes? I guess as long as the
> end
> > result still allows FileUpload to be built and tested against the
> Servlet
> > 2.3 API, per the Maven POM, I'm not averse to enabling it to be built
> and
> > tested against the Servlet 2.4 API as well.
>
> About 10 methods added to the PageContext, HttpServletRequest and
> HttpServletResponse classes; thus their mock descendants in the test
> package need them too. I implemented them all as
> UnsupportedOperationExceptions.
>
> Pretty sure it'd be fine with 2.2, but will definitely test this prior
> to committing.
>
> It's not a biggy - but as I was doing it for work, I figured I'd offer.


Sure, go for it. And thanks!

--
Martin Cooper


Hen
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>
>

Re: [fileupload] Compile against Servlet 2.4 spec?

Posted by Henri Yandell <fl...@gmail.com>.
On 4/11/06, Martin Cooper <ma...@apache.org> wrote:
> On 4/11/06, Henri Yandell <fl...@gmail.com> wrote:
> >
> > At work I compile FileUpload against the Servlet 2.4 spec. This means
> > a patch so that the mock classes in the unit test will successfully
> > extend the 2.4 super classes.
> >
> > Any interest in this being applied to fileupload?
>
>
> Can you say more about the nature of the changes? I guess as long as the end
> result still allows FileUpload to be built and tested against the Servlet
> 2.3 API, per the Maven POM, I'm not averse to enabling it to be built and
> tested against the Servlet 2.4 API as well.

About 10 methods added to the PageContext, HttpServletRequest and
HttpServletResponse classes; thus their mock descendants in the test
package need them too. I implemented them all as
UnsupportedOperationExceptions.

Pretty sure it'd be fine with 2.2, but will definitely test this prior
to committing.

It's not a biggy - but as I was doing it for work, I figured I'd offer.

Hen

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: [fileupload] Compile against Servlet 2.4 spec?

Posted by Martin Cooper <ma...@apache.org>.
On 4/11/06, Henri Yandell <fl...@gmail.com> wrote:
>
> At work I compile FileUpload against the Servlet 2.4 spec. This means
> a patch so that the mock classes in the unit test will successfully
> extend the 2.4 super classes.
>
> Any interest in this being applied to fileupload?


Can you say more about the nature of the changes? I guess as long as the end
result still allows FileUpload to be built and tested against the Servlet
2.3 API, per the Maven POM, I'm not averse to enabling it to be built and
tested against the Servlet 2.4 API as well.

--
Martin Cooper


Hen
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>
>