You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Carsten Ziegeler <cz...@apache.org> on 2007/12/05 12:06:39 UTC

Servlet API version issues

Hi,

the latest svn code uses different servlet versions. While core etc. is
based on version 2.4, the jsp stuff uses 2.5.

It would be great to just use one version throughout the code base if
possible. We should base Sling on version 2.4 but it might make sense to
already support 2.5. So what about using 2.5 everywhere but try to be
2.4 compatible?

Carsten
-- 
Carsten Ziegeler
cziegeler@apache.org

Re: Servlet API version issues

Posted by Felix Meschberger <fm...@gmail.com>.
Am Mittwoch, den 05.12.2007, 13:30 +0100 schrieb Carsten Ziegeler:
> Bertrand Delacretaz wrote:
> > On Dec 5, 2007 12:06 PM, Carsten Ziegeler <cz...@apache.org> wrote:
> > 
> >> ...what about using 2.5 everywhere but try to be
> >> 2.4 compatible?...
> > 
> > How do we check the "2.4 compatible" bit if using the 2.5 APIs?
> > 
> > That sounds like a hard promise to keep, and I'd hate having us waste
> > time helping users fight with servlet engine compatibility problems.
> > 
> Hmm, in general I agree with you, but :) I don't think that this is a
> very big effort - for example we did this in Cocoon for years.
> Now, if we implement the 2.5 version whereever we implement servlet api
> things ourselves (like our own servlet context impl in core) and use 2.4
> version everywhere else this should work fine.

Perhaps we should guard calls to 2.5 API by a check to the minor version
in the ServletContext implementation to not get a NoSuchMethodError.

Regards
Felix


Re: Servlet API version issues

Posted by Bertrand Delacretaz <bd...@apache.org>.
On Dec 5, 2007 1:30 PM, Carsten Ziegeler <cz...@apache.org> wrote:

> ...I was a little bit unclear :) I think we should use
> the 2.4 version in most of our poms, so we can assure that only 2.4 api
> is used. However if we implement servlet api somewhere, this module
> should use the 2.5 version (if I see this correctly this is currently
> just core and api)....

I'd be ok with that, thanks for clarifying.

-Bertrand

Re: Servlet API version issues

Posted by Carsten Ziegeler <cz...@apache.org>.
Carsten Ziegeler wrote:
> Bertrand Delacretaz wrote:
>> On Dec 5, 2007 12:06 PM, Carsten Ziegeler <cz...@apache.org> wrote:
>>
>>> ...what about using 2.5 everywhere but try to be
>>> 2.4 compatible?...
>> How do we check the "2.4 compatible" bit if using the 2.5 APIs?
>>
>> That sounds like a hard promise to keep, and I'd hate having us waste
>> time helping users fight with servlet engine compatibility problems.
>>
> Hmm, in general I agree with you, but :) I don't think that this is a
> very big effort - for example we did this in Cocoon for years.
> Now, if we implement the 2.5 version whereever we implement servlet api
> things ourselves (like our own servlet context impl in core) and use 2.4
> version everywhere else this should work fine.
> 
> Rereading my email, I was a little bit unclear :) I think we should use
> the 2.4 version in most of our poms, so we can assure that only 2.4 api
> is used. However if we implement servlet api somewhere, this module
> should use the 2.5 version (if I see this correctly this is currently
> just core and api).
                ^^^^^
                jsp of course - not api

> 
> Carsten
> 


-- 
Carsten Ziegeler
cziegeler@apache.org

Re: Servlet API version issues

Posted by Carsten Ziegeler <cz...@apache.org>.
Bertrand Delacretaz wrote:
> On Dec 5, 2007 12:06 PM, Carsten Ziegeler <cz...@apache.org> wrote:
> 
>> ...what about using 2.5 everywhere but try to be
>> 2.4 compatible?...
> 
> How do we check the "2.4 compatible" bit if using the 2.5 APIs?
> 
> That sounds like a hard promise to keep, and I'd hate having us waste
> time helping users fight with servlet engine compatibility problems.
> 
Hmm, in general I agree with you, but :) I don't think that this is a
very big effort - for example we did this in Cocoon for years.
Now, if we implement the 2.5 version whereever we implement servlet api
things ourselves (like our own servlet context impl in core) and use 2.4
version everywhere else this should work fine.

Rereading my email, I was a little bit unclear :) I think we should use
the 2.4 version in most of our poms, so we can assure that only 2.4 api
is used. However if we implement servlet api somewhere, this module
should use the 2.5 version (if I see this correctly this is currently
just core and api).

Carsten

-- 
Carsten Ziegeler
cziegeler@apache.org

Re: Servlet API version issues

Posted by Bertrand Delacretaz <bd...@apache.org>.
On Dec 5, 2007 12:06 PM, Carsten Ziegeler <cz...@apache.org> wrote:

> ...what about using 2.5 everywhere but try to be
> 2.4 compatible?...

How do we check the "2.4 compatible" bit if using the 2.5 APIs?

That sounds like a hard promise to keep, and I'd hate having us waste
time helping users fight with servlet engine compatibility problems.

-Bertrand

Re: Servlet API version issues

Posted by Felix Meschberger <fm...@gmail.com>.
Hi,

Am Mittwoch, den 05.12.2007, 12:06 +0100 schrieb Carsten Ziegeler:
> the latest svn code uses different servlet versions. While core etc. is
> based on version 2.4, the jsp stuff uses 2.5.

The reason for this is, that JSP uses Jasper 6 inside, which is Servlet
API 2.5 and JSP 2.1.

Regards
Felix