camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen">
Subject RE: using jetty request params in xml-defined route
Date Wed, 03 Sep 2008 12:16:50 GMT

Yes please create a JIRA for this as you can only get the http request parameters by using
a the getHttpRequest on the HttpExchange and thus you need java code and can't do it from
the simple expression language.

I think it should be able to access the httprequest parameters from, then
its easy to use content based routing as well.

Med venlig hilsen
Claus Ibsen
Skovsgårdsvænget 21
8362 Hørning
Tlf. +45 2962 7576
-----Original Message-----
From: Steve A. [] 
Sent: 3. september 2008 13:37
Subject: RE: using jetty request params in xml-defined route

Claus Ibsen wrote:
> Its easier to help if you post a snippet of your route.
> I would assume that the parameters is stored in the in message as headers.
> So you should be able to access them using the simple language from the
> xml routing also.
> <simple></simple>

Actually, it would be great if that were possible, but as far as I can tell,
the http request parameters never get set in the header nor properties of
the jetty exchange.

e.g. if the request is http://localhost:8080/test?x=1, then x is not
accessible via ${in.header.x}, ${in.body}, or ${property.x}.

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

Of course, if I replace the <setBody> above to a <process> and create a
Processor Java class that contains the following, then it works, but I'd
like to keep the routes in the Spring xml to the extent possible, since
run-time configuration changes are a major goal:

	public void process(Exchange exchange) throws Exception {
		HttpServletRequest req =
		exchange.getOut(true).setBody("<html><body>" + req.getParameter("x") +

Please advise if my understanding of how this works is incorrect, or if this
should be a JIRA enhancement for the Jetty component.

Thanks in advance,

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

View raw message