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 0861317EE1 for ; Fri, 31 Oct 2014 01:16:53 +0000 (UTC) Received: (qmail 28556 invoked by uid 500); 31 Oct 2014 01:16:52 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 28505 invoked by uid 500); 31 Oct 2014 01:16:52 -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 28493 invoked by uid 99); 31 Oct 2014 01:16:51 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 31 Oct 2014 01:16:51 +0000 X-ASF-Spam-Status: No, hits=0.3 required=5.0 tests=FREEMAIL_REPLY,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of willem.jiang@gmail.com designates 209.85.220.44 as permitted sender) Received: from [209.85.220.44] (HELO mail-pa0-f44.google.com) (209.85.220.44) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 31 Oct 2014 01:16:47 +0000 Received: by mail-pa0-f44.google.com with SMTP id bj1so6660121pad.3 for ; Thu, 30 Oct 2014 18:15:41 -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:content-transfer-encoding:content-disposition; bh=xi09xyMpdPq22drstTd1CVrxvJ2awOfVBYqYjCVV0UU=; b=Ht6+Fz8THxoBfwSP230ijtqoo56vLdUlE9i8N2G5lOStCX6rmccqXIFwWN74M+8MmL jltnLtdoG4G6BR6kMQNY1RL1jLVFX9YkOW5T7qzthsscEKrnX1g6zkqkoRvRSi3f39M1 bXlONEVaoqib6v+QHESoyNSgKv3fxKUB7RJWRTJ4W2yLTpd95XhNR0/g9UhFRj3N8TKg g5pnCG9haef2p9B0Dl/Q8CKEIHCHJJ3N3vY+B0IhgAh3Hm0r0ENfw8CmRc9DAm1exbUm Ry62ZKZJihok5KTso78XgWPGu3iCPXDIkN4V3MUqGmQ/TbeWrKSzyNCm0CvVgVFsrp5h ASZA== X-Received: by 10.70.48.175 with SMTP id m15mr7501649pdn.153.1414718141300; Thu, 30 Oct 2014 18:15:41 -0700 (PDT) Received: from localhost ([61.149.13.146]) by mx.google.com with ESMTPSA id gn6sm8253472pbc.40.2014.10.30.18.15.35 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 30 Oct 2014 18:15:36 -0700 (PDT) Date: Fri, 31 Oct 2014 09:15:21 +0800 From: Willem Jiang To: users@camel.apache.org Message-ID: In-Reply-To: References: Subject: Re: Configuring a servlet with camel-jetty X-Mailer: Airmail (249) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Virus-Checked: Checked by ClamAV on apache.org Can you explain why you need a setup a servlet for the camel-jetty compon= ent=3F As camel-jetty setup the ServletContextHandler by itself, it doesn=E2=80=99= t support you to do it that way. -- =20 Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang =20 Weibo: =E5=A7=9C=E5=AE=81willem On October 30, 2014 at 7:12:33 PM, jack atwork (jrmpatwork=40gmail.com) w= rote: > It's contributed via spring. I can see this part is fine because if I > misconfigure the id with something like 'MyUnregisteredContextHandler' = then > I get a NoSuchBeanException when the camelContext is created. > =20 > Does anybody know of any examples of setting up a servlet with camel-je= tty=3F > If I add a filter to the handler I can see it gets executed on requests= but > for some reason any servlets I add never get invoked. > =20 > Jack > =20 > On 29 October 2014 15:36, Andrew Block wrote: > =20 > > Jack, > > > > Have you added the handler to the Camel Registry with the name > > MyContextHandler=3F In your example, you are referencing the > > =E2=80=9CMyContetHandler=E2=80=9D in your route, but never show it be= ing added to the Camel > > registry. > > > > - Andy > > > > -- > > Andrew Block > > > > > > On October 29, 2014 at 10:14:21 AM, jack atwork (jrmpatwork=40gmail.c= om) > > wrote: > > > > apologies, hit send by a bit early=21 > > > > Hi, > > > > I'm trying to configure a servlet using the camel-jetty component but= I'm > > struggling and hoping somebody might be able to point out what I'm do= ing > > wrong. > > > > I expected to be able to register a new Handler and reference it in t= he > > endpoint uri. > > > > ServletContextHandler handler =3D new ServletContextHandler(); > > handler.addServlet(new ServletHolder(myServlet), =22/*=22); > > > > Then adding a route to my routeBuilder: > > > > from(=22jetty: > > http://localhost:8080/=3FmatchOnUriPrefix=3Dtrue&handlers=3D=23MyCont= extHandler=22) =20 > > .to(=22log:foo=22); > > > > I can see my servlet gets initialised but it is never invoked on any > > requests. Can anyone tell me what's missing=3F > > > > Thanks, > > > > Jack > > > > > > On 29 October 2014 15:06, jack atwork wrote: > > > > > Hi, > > > > > > I'm trying to configure a servlet using the camel-jetty component b= ut > > I'm > > > struggling and hoping somebody might be able to point out what I'm = doing > > > wrong. > > > > > > I expected to be able to register a new Handler and reference it in= the > > > endpoint uri . > > > > > > ServletContextHandler handler =3D new ServletContextHandler(); > > > handler.addServlet(new ServletHolder(myServlet), =22/*=22); > > > > > > Then adding a route to my routeBuilder: > > > > > > > > > > > > > > > > > > > > =20