Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-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 25C7C17CC3 for ; Wed, 29 Oct 2014 15:38:55 +0000 (UTC) Received: (qmail 92906 invoked by uid 500); 29 Oct 2014 15:38:54 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 92856 invoked by uid 500); 29 Oct 2014 15:38:54 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 92843 invoked by uid 99); 29 Oct 2014 15:38:54 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Oct 2014 15:38:54 +0000 X-ASF-Spam-Status: No, hits=2.5 required=5.0 tests=FREEMAIL_REPLY,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of andy.block@gmail.com designates 209.85.213.173 as permitted sender) Received: from [209.85.213.173] (HELO mail-ig0-f173.google.com) (209.85.213.173) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Oct 2014 15:38:26 +0000 Received: by mail-ig0-f173.google.com with SMTP id r10so1493427igi.12 for ; Wed, 29 Oct 2014 08:36:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:message-id:in-reply-to:references:subject:mime-version :content-type; bh=pzOGqviMuhmdVmVRcZLKzcBtQGm+9clu25Do88vBigQ=; b=PVV4pzdQv7J8WHiaPHTH0q692z54KQ9narryVT7qk2OrIiHSGO545tOtRzS4rdSipG OKNaeyUvuEc4whahVuxxQVQSXnV4XQlizaPFvHd4GAz92rkh0Y7qi6yKBR7edwgxhTNb HNAVdSJqI81fzGddtlGoMGwkMAmQK8r/rC1sBUW/tHHI0B5KYwsXaJ+YAf5wR3f+il4t 9liRPMutzY5sMOvHvHv+NLoRsgTXUHgllat12LtNrsL+tUg6+kmvCr11q4TMA2GTIslA R8c16MCUNCkUqw4jG9yEaEZv+47w3jpufwajZN9NioAM+Z1F3CnBdVV5kR0z7KIce6WQ qxLg== X-Received: by 10.107.15.213 with SMTP id 82mr3692164iop.63.1414597015191; Wed, 29 Oct 2014 08:36:55 -0700 (PDT) Received: from Andrews-MacBook-Pro.local ([161.225.196.41]) by mx.google.com with ESMTPSA id oq6sm8080430igb.2.2014.10.29.08.36.53 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 29 Oct 2014 08:36:54 -0700 (PDT) Date: Wed, 29 Oct 2014 10:36:52 -0500 From: Andrew Block To: users@camel.apache.org, jack atwork Message-ID: In-Reply-To: References: Subject: Re: Configuring a servlet with camel-jetty X-Mailer: Airmail (249) MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="54510994_3855585c_1437f" X-Virus-Checked: Checked by ClamAV on apache.org --54510994_3855585c_1437f Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Jack, Have you added the handler to the Camel Registry with the name MyContextH= andler=3F In your example, you are referencing the =E2=80=9CMyContetHandl= er=E2=80=9D in your route, but never show it being added to the Camel reg= istry. - Andy --=C2=A0 Andrew Block On October 29, 2014 at 10:14:21 AM, jack atwork (jrmpatwork=40gmail.com) = wrote: apologies, hit send by a bit early=21 =20 Hi, =20 I'm trying to configure a servlet using the camel-jetty component but I'm= =20 struggling and hoping somebody might be able to point out what I'm doing = =20 wrong. =20 I expected to be able to register a new Handler and reference it in the =20 endpoint uri. =20 ServletContextHandler handler =3D new ServletContextHandler(); =20 handler.addServlet(new ServletHolder(myServlet), =22/*=22); =20 Then adding a route to my routeBuilder: =20 from(=22jetty: =20 http://localhost:8080/=3FmatchOnUriPrefix=3Dtrue&handlers=3D=23MyContextH= andler=22) =20 .to(=22log:foo=22); =20 I can see my servlet gets initialised but it is never invoked on any =20 requests. Can anyone tell me what's missing=3F =20 Thanks, =20 Jack =20 On 29 October 2014 15:06, jack atwork wrote: =20 > Hi, =20 > =20 > I'm trying to configure a servlet using the camel-jetty component but I= 'm =20 > struggling and hoping somebody might be able to point out what I'm doin= g =20 > wrong. =20 > =20 > I expected to be able to register a new Handler and reference it in the= =20 > endpoint uri . =20 > =20 > ServletContextHandler handler =3D new ServletContextHandler(); =20 > handler.addServlet(new ServletHolder(myServlet), =22/*=22); =20 > =20 > Then adding a route to my routeBuilder: =20 > =20 > =20 > =20 > =20 > =20 --54510994_3855585c_1437f--