Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0D2309A51 for ; Tue, 17 Apr 2012 19:23:40 +0000 (UTC) Received: (qmail 76244 invoked by uid 500); 17 Apr 2012 19:23:36 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 76150 invoked by uid 500); 17 Apr 2012 19:23:36 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 76141 invoked by uid 99); 17 Apr 2012 19:23:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Apr 2012 19:23:36 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of pid@pidster.com designates 74.125.83.45 as permitted sender) Received: from [74.125.83.45] (HELO mail-ee0-f45.google.com) (74.125.83.45) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Apr 2012 19:23:29 +0000 Received: by eeit10 with SMTP id t10so2808475eei.18 for ; Tue, 17 Apr 2012 12:23:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pidster.com; s=google; h=message-id:date:from:organization:user-agent:mime-version:to :subject:references:in-reply-to:x-enigmail-version:openpgp :content-type; bh=rHDV5KZBjwrSCo3R0RG2Zf1hveGglRlxQQsI8NKO6xk=; b=h7U/Kvq/nhl6NC73bgQCJGjgLg/HdMbMwf+f51pGxKEIJCUVx43mdeeADpvnJvuDtT S1OpwxSfHov4tj9eVaB28Ji+Aqa1cBtI36j+jpef60dbTOHeNc/joNM4T/vo5rDMcbOP +fv5XLwszmFXR6e8m4DwYdQMJLd0RrKKfCZlU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:organization:user-agent:mime-version:to :subject:references:in-reply-to:x-enigmail-version:openpgp :content-type:x-gm-message-state; bh=rHDV5KZBjwrSCo3R0RG2Zf1hveGglRlxQQsI8NKO6xk=; b=MO0looZQmgvPAiw+lu8JwpdDHTkUZs3OF4ptJOLkpE+Jl1lhtdLjLsddBVTBu8GpVE /hTplMtylX9nXjP/YZPyimikSgx+8Vz0B+TiitY36uefgNS55YcnaCf99Vd3SGlNUsnx PUvdp3vo/9NyYYPgcmcFZB1vDce3649fkhwUXu2MOy2ua8j6ipUw5i4VD2bAguWqHHaZ 4Pq3qG2er68rFpClYRlSb29rZepthIB9U3WG7qot7YB+GWv/Kp6sVR2/ViOl2UaXxSSS 25j9CKA/x41wWHKg4vG3AgjtJ6ppvo6ZvUOWlPLmLOot7zRmCe+I1J/eV+RCpmjjDlxX fB7A== Received: by 10.14.130.202 with SMTP id k50mr2492662eei.113.1334690588169; Tue, 17 Apr 2012 12:23:08 -0700 (PDT) Received: from Asura.local (cpc10-lewi14-2-0-cust355.2-4.cable.virginmedia.com. [82.4.249.100]) by mx.google.com with ESMTPS id d54sm106624941eei.9.2012.04.17.12.23.05 (version=SSLv3 cipher=OTHER); Tue, 17 Apr 2012 12:23:06 -0700 (PDT) Message-ID: <4F8DC312.9020307@pidster.com> Date: Tue, 17 Apr 2012 20:22:58 +0100 From: Pid Organization: Pidster Inc User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:11.0) Gecko/20120327 Thunderbird/11.0.1 MIME-Version: 1.0 To: Tomcat Users List Subject: Re: Why @WebServlet annotation is not processed when web.xml is version 2.5? References: In-Reply-To: X-Enigmail-Version: 1.4 OpenPGP: id=62590808 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enig2EC94AC1BB19C8EDFBEF30BF" X-Gm-Message-State: ALoCoQlm85YTu5L6jajYZJ0S5cn4mPSHMcUWThTkJ9BjB/Z54yGvgzne1lmVA0ku8LNBW1CSg90a X-Virus-Checked: Checked by ClamAV on apache.org --------------enig2EC94AC1BB19C8EDFBEF30BF Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 17/04/2012 13:48, maria petrova wrote: > Hi, >=20 >=20 > We=92ve embedded Tomcat 7.0.26 in our product and we are currently tryi= ng > to cover Servlet 3.0 CTS with it. We=92ve encountered the following > problem with one of the tests. >=20 > Though the version of the web deployment descriptor of the test > application is 2.5, there is a servlet annotated with *@WebServlet > *annotation and requests to this servlet are responded with 404 Not > Found. When I change the version of the web.xml to 3.0 everything works= > just fine. >=20 >=20 > In Chapter /=93*1.6.2 Regarding Processing annotations*=94/ in the Serv= let > 3.0 Specification it is said that: >=20 > /=93The version of the descriptor MUST not affect which annotations you= > scan for in a web application.=94/ It also says: "An implementation of a particular version of the specification MUST scan for all annotations supported in that configuration, unless metadata-complete is specified." So I ask "which configuration?" - interpreting it to mean that Servlet 3.0 supports the WebServlet annotation etc, and 2.5 does not, because that annotation is not present in 2.5. p > So my understanding is that the application should be processed for > Servlet 3.0 specific annotations regardless of the version of the > deployment descriptor. >=20 >=20 > As far as I=92m aware, each new Tomcat release successfully covers Serv= let > 3.0 CTS, so I=92m wondering if I=92ve missed some configuration on Tomc= at side? >=20 > Any hints or ideas are highly appreciated. >=20 >=20 > Thanks! >=20 > Maria >=20 >=20 > P.S. The issue is easily reproducible with clean Tomcat 7.0.26 > installation and the attached simple test applications. They differ onl= y > in the web.xml=92s version and only /AnnotTest_30/AnnotServlet is > correctly responded, while /AnnotTest_25/AnnotServlet gets 404 response= =2E >=20 >=20 >=20 >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > For additional commands, e-mail: users-help@tomcat.apache.org --=20 [key:62590808] --------------enig2EC94AC1BB19C8EDFBEF30BF Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.18 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQIcBAEBCgAGBQJPjcMYAAoJEGoM2OGpOvr90moP/jA8P/fUmNG6haBC7VWxLkIJ il+uBpYyHRgyC0WGL/wcmbRKDnnCeYA8fUWeSYNThDwB2UMRBNxT5SutAgtZC5x2 sYDZu0WSjktnSRuADNSML9lUUzNdIsVJZ+vez5mIkmslKmK6dNCMueWyK77K5KuE 3Wf/FJWT+8cm/W0oz4ZpbGTXxU8Qg9vPAH8a0o1PUhG/kxs0E0npbBxEWcBS1eps aqXHrDHhAeP+/c/CqnRpPeoty1APhzOPoMXxO9TLSre0fenjzjDzQrgRP+W6+cZu xMegOP8sfMVtQB5yGT024edN/Hpjme4s3xxJ6Kng+mI7zWrOEiof0sAau0h/vwm9 QaE2+oKG7aCwXvmS7S6TkA0elbOjtvgKdyEwGB6OPPPUU1U2Ec75Py4qF0UFlxok 1k8jwAiiIAq1qpb3NbGR2UQBFKix5TK/yYrJ8zA5Zkv0iW8lo702zM05Lrb+2qva 62oA41ZiER6z+YnDqKpG3sIvYTBYUmbWAXn89W6OY50CUbfyyDLm84F3n96/FKYQ qrh8frUEABn9Ybveu0AwTptSLbuZ2PZB6JBDXw19rHm1L38xrpRj0XQG0BksYFzy Nv1Zbh2OuzpUE55UNV4ezV1gyQAmRtdcfoVaEDLJeckQIv8Yx2QkKtYrv+lVmfwn HNxpqDzgotJB1ZZZCc9H =a0J1 -----END PGP SIGNATURE----- --------------enig2EC94AC1BB19C8EDFBEF30BF--