camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bilgin Ibryam <>
Subject Re: Set header from velocity template
Date Tue, 15 Apr 2014 17:23:32 GMT
Velocity will put the result of the evaluation in the message body, you
cannot change that.
But you could preserve the existing body by putting it into a header before
calling velocity template, and then swap the template result with the
previous body afterwards...


On 15 April 2014 18:13, dunnlow <> wrote:

> Sorry, I should have given more detail.
> I am using velocity to create web pages.  My template is an html formatted
> document (about 40 lines) that uses existing exchange headers.  (This gets
> turned into a web page downstream.)
> In my (xml) route I have something like:
>      <to uri="velocity://tohtml.vm"/>
> However, this puts my html template into the BODY.  I need to keep the
> current body intact (downstream routes depend on having the original
> message) so I want to do this same evaluation, but put the new evaluated
> template it into a HEADER.
> Thanks again,
> -J
> --
> View this message in context:
> Sent from the Camel - Users mailing list archive at

Bilgin Ibryam

Apache Camel & Apache OFBiz committer
Twitter: @bibryam <>

Author of Instant Apache Camel Message Routing

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message