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 42CAB9145 for ; Wed, 18 Apr 2012 09:42:53 +0000 (UTC) Received: (qmail 14226 invoked by uid 500); 18 Apr 2012 09:42:49 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 14048 invoked by uid 500); 18 Apr 2012 09:42:49 -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 14009 invoked by uid 99); 18 Apr 2012 09:42:48 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Apr 2012 09:42:48 +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 (nike.apache.org: domain of pid@pidster.com designates 209.85.214.45 as permitted sender) Received: from [209.85.214.45] (HELO mail-bk0-f45.google.com) (209.85.214.45) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Apr 2012 09:42:39 +0000 Received: by bkcjg9 with SMTP id jg9so7055587bkc.18 for ; Wed, 18 Apr 2012 02:42:19 -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=BhYdVi03jFSKRNvuXMXr3chkdya2BD7kiMqOBDqRtqY=; b=BINh3XlCZem/gR6O11yDcsBZrlGpRO+lRUJueBhZ3QwnxQJYa3+8PbhVhtbCRObPv7 ROn01HDfHxjWRxMEl62fO+uycuvZl1p81WT4SF5KLShKnyJku+DwFoKOtbbCN3PCyWRf U9xWM2DUbY5n3MNlj8ZYhNP5Ogn68VmDiz1wo= 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=BhYdVi03jFSKRNvuXMXr3chkdya2BD7kiMqOBDqRtqY=; b=EBI5C0uVG1aNhGKoQM11q5DWeIN9ndCqC8Z9xCiphsjYcL/fi1xTMWm/pZhjq+6eyR DU2MZaNJ7HU3WNlXPNgq1tco1yV4R+l++1SDjAm88CLwgU491wO2nL4+wgPZ5cIzTJoU 6QeGk6lBkiGwcHv61kKPabKTi3xKLg+9bG+D5YQopWL5AdgelYsI+5jYwPwHS8q98PEl OkeOqYnpMsvUAtVxEkr3uUCSp9l10Wpud4QFyZ1ISJ3acMv/OFg2s0yIIPaVogRx3Xwb v53n+FMx1AvuxqGAIKcKckThHJVPv2cHsfsmnyotF7KYWOTL//ldcIHc/36OrsvhinEx g3fA== Received: by 10.205.133.13 with SMTP id hw13mr482419bkc.25.1334742139193; Wed, 18 Apr 2012 02:42:19 -0700 (PDT) Received: from Asura.local ([81.134.122.147]) by mx.google.com with ESMTPS id gw19sm42982858bkc.8.2012.04.18.02.42.16 (version=SSLv3 cipher=OTHER); Wed, 18 Apr 2012 02:42:17 -0700 (PDT) Message-ID: <4F8E8C6E.7020207@pidster.com> Date: Wed, 18 Apr 2012 10:42:06 +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: <4F8DC312.9020307@pidster.com> In-Reply-To: X-Enigmail-Version: 1.4 OpenPGP: id=62590808 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enig0EEFD2D90E6716F886F777B4" X-Gm-Message-State: ALoCoQklp4F9hiV9qgBx1C9bUT1PPZpU+z3X2/J/rfkpTPMMb9paBa0d64lt+KwK0uA4i1oOG5Cb --------------enig0EEFD2D90E6716F886F777B4 Content-Type: text/plain; charset=windows-1251 Content-Transfer-Encoding: quoted-printable On 18/04/2012 09:15, maria petrova wrote: > Hi, >=20 > Thanks for the clarification. I agree that the specification is not > absolutely clear on this matter in the given extract. > Anyway, I simply would like to ask you, as Tomcat experts, for hints or= > ideas how to configure my Tomcat to make it pass the Servlet 3.0 CTS. > I know that Tomcat 7.x regularly covers the complete Servlet 3.0 CTS an= d > probably there is a hidden property that I=92m missing? Set 3.0 as the version in web.xml for apps using Servlet 3.0 features? Alternatively you could, of course, set the hidden system property: -Dorg.apache.catalina.alwaysPassServlet30CTS=3Dtrue p > Thanks and regards, > Maria >=20 > =CD=E0 17 =E0=EF=F0=E8=EB 2012, 22:22, Pid =ED=E0=EF=E8= =F1=E0: >=20 >> On 17/04/2012 13:48, maria petrova wrote: >>> Hi, >>> >>> >>> We=92ve embedded Tomcat 7.0.26 in our product and we are currently tr= ying >>> to cover Servlet 3.0 CTS with it. We=92ve encountered the following >>> problem with one of the tests. >>> >>> 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 wor= ks >>> just fine. >>> >>> >>> In Chapter /=93*1.6.2 Regarding Processing annotations*=94/ in the Se= rvlet >>> 3.0 Specification it is said that: >>> >>> /=93The version of the descriptor MUST not affect which annotations y= ou >>> 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. >>> >>> >>> As far as I=92m aware, each new Tomcat release successfully covers Se= rvlet >>> 3.0 CTS, so I=92m wondering if I=92ve missed some configuration on To= mcat >> side? >>> >>> Any hints or ideas are highly appreciated. >>> >>> >>> Thanks! >>> >>> Maria >>> >>> >>> P.S. The issue is easily reproducible with clean Tomcat 7.0.26 >>> installation and the attached simple test applications. They differ o= nly >>> in the web.xml=92s version and only /AnnotTest_30/AnnotServlet is >>> correctly responded, while /AnnotTest_25/AnnotServlet gets 404 respon= se. >>> >>> >>> >>> >>> ---------------------------------------------------------------------= >>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org >>> For additional commands, e-mail: users-help@tomcat.apache.org >> >> >> -- >> >> [key:62590808] >> >> >=20 --=20 [key:62590808] --------------enig0EEFD2D90E6716F886F777B4 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/ iQIcBAEBCgAGBQJPjox2AAoJEGoM2OGpOvr9EOwP/jwSvhnC618Y/IlTq3P7hZn4 DwUXmDBCW+acK4YetiLgS58angiMyLJG0X8I8PYQQzSuc/jMbWDxkE/LG1V7PLLv j2DTAmd2nIas7tZFJLQ1WfuRWJ/l4QlHKKj4ZZxUUirnb05KkiKW3kIt61mwnDsk ORo1s21ZZM5g7Aix/mX2E00V8avkiukpj0GAGOSNhxi2t+LMAI3OuqUu/3OS3DrJ 6EeKJk93XVKdXfp1NUokfpCdFc7a8d4qC0t0MuJOP9clnYBUta+DAaXcz66p7j9g jvr5g5JQ7QP30js7U7289+Z1RKvAZvSqKQhOlvpnVPGUK6vdjRfjDxO8wb2Qlcte uZib+BpkavGrU0yFbGKIkOJC94SAds8JbdKIwL5dgAO1KEhAa8XaxPqIyE7M3ehl nmw/H27q1cRR+hQjkVc3YkQH+u3nQu7tx5fPe8A41T3+nLl3Tr7bvOKBwsK47JxG A/8r7B+TkdkhrVNm1C9o1J8TmETGDIA5F7doOTAMLyvrxdSi8bvNniZJQ65mTuc7 9y8V8vrs3RYlzOMeoR/JyQmKRV1Yf6t8kiVVytjYY1tDXiH+QQe3gk6lyg05s2zt A0vQMVjTkfRI66OZtg1QmgdaN8fM91ok6SNPS97/YesF0waK68Lxnw5kUaQxcOzh 22+l4Ff4QnNZw+SCAWGd =wPDZ -----END PGP SIGNATURE----- --------------enig0EEFD2D90E6716F886F777B4--