camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rwoolf <r...@rosswoolf.com>
Subject Jetty in route not working as expected
Date Thu, 10 Dec 2015 21:45:27 GMT
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.

Mime
View raw message