Return-Path: X-Original-To: apmail-camel-dev-archive@www.apache.org Delivered-To: apmail-camel-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 724664F68 for ; Tue, 5 Jul 2011 12:44:41 +0000 (UTC) Received: (qmail 54085 invoked by uid 500); 5 Jul 2011 12:44:41 -0000 Delivered-To: apmail-camel-dev-archive@camel.apache.org Received: (qmail 53950 invoked by uid 500); 5 Jul 2011 12:44:40 -0000 Mailing-List: contact dev-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list dev@camel.apache.org Received: (qmail 53942 invoked by uid 99); 5 Jul 2011 12:44:40 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Jul 2011 12:44:40 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Jul 2011 12:44:38 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id C5260436A6 for ; Tue, 5 Jul 2011 12:44:16 +0000 (UTC) Date: Tue, 5 Jul 2011 12:44:16 +0000 (UTC) From: "Stu Churchill (JIRA)" To: dev@camel.apache.org Message-ID: <1229346130.508.1309869856804.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <359190115.503.1309869737000.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (CAMEL-4175) Enable Restlet servlet to be configured within a webapp MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/CAMEL-4175?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Stu Churchill updated CAMEL-4175: --------------------------------- Attachment: camel-4175.txt > Enable Restlet servlet to be configured within a webapp > ------------------------------------------------------- > > Key: CAMEL-4175 > URL: https://issues.apache.org/jira/browse/CAMEL-4175 > Project: Camel > Issue Type: Improvement > Components: camel-restlet > Affects Versions: 2.7.2 > Reporter: Stu Churchill > Fix For: 2.7.3 > > Attachments: camel-4175.txt > > > There are three possible ways to configure a Restlet application within a servlet container (http://www.restlet.org/documentation/2.0/jee/ext/org/restlet/ext/servlet/ServerServlet.html) and using the subclassed SpringServerServlet enables configuration within Camel by injecting the Restlet Component - however this is currently only available internally within the Camel component. > Use of the Restlet servlet within a servlet container enables routes to be configured with relative paths in URIs (removing the restrictions of hard-coded absolute URIs) and for the hosting servlet container to handle incoming requests (rather than have to spawn a separate server process on a new port). > To configure, add the following to your camel-context.xml; > > > > > Request type : ${header.CamelHttpMethod} and ID : ${header.id} > > > > > > > > > > And add this to your web.xml; > > > RestletServlet > org.restlet.ext.spring.SpringServerServlet > > org.restlet.component > RestletComponent > > > > RestletServlet > /rs/* > > You will then be able to access the deployed route at http://localhost:8080/mywebapp/rs/demo/1234 where; > - localhost:8080 is the server and port of your servlet container > - mywebapp is the name of your deployed webapp > Your browser will then show the following content; > "Request type : GET and ID : 1234" -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira