users@servlet-spec.java.net

[servlet-spec users] Re: Should Servlet 3.0 compliant Web Container process @WebServlet annotation if app's web.xml is version 2.5?

From: Greg Wilkins <gregw_at_intalio.com>
Date: Wed, 30 May 2012 10:29:23 +0200

On 25 May 2012 23:12, Linda DeMichiel <linda.demichiel_at_oracle.com> wrote:

> The Java EE 7 Platform spec Early Draft states the following (in section 8.5,
> "Deployment"):
>
> "Note that the deployment descriptor version refers only to the version of the XML schema
>
> or DTD against which the descriptor is to be validated. It does not provide any
> information as to what version of the Java EE platform the application is written to."
>
> I propose adding the following text:
>
> "In particular, the version of the deployment descriptor does not otherwise determine
> what APIs or container features can or cannot be used or the semantics of those features."
>
> Do you all think that will be clear enough?


It does make it clear enough. However, it does raise the question
why do we support old XML versions if we don't guarantee that the
semantics are identical.

Would it not make more sense to simply give a validation error if an
old descriptor is deployed on a newer version? Given that we agree
that behaviour can change, asking a user to update the web.xml may be
a good way to ensure they understand this.

regards