camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Jetty in route not working as expected
Date Fri, 11 Dec 2015 06:56:12 GMT
Make sure to type it correct, eg a colon was missing, and maybe avoid
using port 80, if that is not free on your computer

<from uri="jetty:http://localhost:8888/test"/>

And use 0.0.0.0 instead of localhost if it should be reachable from
outside the localhost.



On Thu, Dec 10, 2015 at 10:45 PM, rwoolf <ross@rosswoolf.com> wrote:
> I have created a very simple route that uses Jetty to try to learn how to use
> it.  I am trying this in servicemix 6.0.1  My camel context is defined in
> blueprint.  The jetty server instance starts, but I always get 404 error
> when trying to call anything.
>
> In my browser I make a make a request to: http://localhost/test?id=2.
>
> I would expect to get my ID of 2 to be output to the logs, and then the
> response to the browser be the text "Hello World"
>
> But nothing happens in Camel, the route is never called.  What I get back in
> the browser is:
> HTTP ERROR: 404
> Problem accessing /test. Reason:
> Not Found
> Powered by Jetty://
>
> Am I missing something simple?  Do I not understand the use of Jetty
> correctly?  Any help appreciated.
>
> Here is my simple blueprint/camel context
>
> <?xml version="1.0" encoding="UTF-8"?>
> <blueprint
>     xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
>     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>     xsi:schemaLocation="
>       http://www.osgi.org/xmlns/blueprint/v1.0.0
>       http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
>
>     <camelContext xmlns="http://camel.apache.org/schema/blueprint">
>       <route>
>         <from uri="jetty:http//localhost/test"/>
>         <log message="${in.header.id}"/>
>         <setBody>
>           <constant>Hello World</constant>
>         </setBody>
>       </route>
>     </camelContext>
> </blueprint>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Jetty-in-route-not-working-as-expected-tp5774970.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Mime
View raw message