camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmcb55 <>
Subject Re: Why do these two trivial Jetty routes return different response codes?
Date Wed, 09 Jul 2014 12:58:22 GMT
So, to answer my own question, the problem was that I was using
'constant(200)' inside the anonymous route processor! The use of the
'constant()' method is only applicable when using methods on the route
itself, such as:

    .setHeader(Exchange.HTTP_RESPONSE_CODE, constant(200))

but within an actual processor we need to set the value explicit and not use
the 'constant()' method, i.e.:

    exchange.getIn().setHeader(Exchange.HTTP_RESPONSE_CODE, *200*);

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message