You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by chaituu <ya...@gmail.com> on 2015/04/08 03:01:29 UTC

file:absolute.path is not printing value

<from uri="direct:start"/>
<to uri="file:D://Test/?fileName=1.csv"/>
	<log message="header.Filepath:${file:absolute.path}"/>
  <to uri="velocity:Response.vm"/>

why logger is not printing file:absolute.path?I want to print
file:absolute.path in the velocity template.



--
View this message in context: http://camel.465427.n5.nabble.com/file-absolute-path-is-not-printing-value-tp5765449.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: file:absolute.path is not printing value

Posted by chaituu <ya...@gmail.com>.
thanks claus.it should be after to uri...${header.CamelFileNameProduced}



--
View this message in context: http://camel.465427.n5.nabble.com/file-absolute-path-is-not-printing-value-tp5765449p5765491.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: file:absolute.path is not printing value

Posted by Chaitanya Yarlagadda <ya...@gmail.com>.
thanks claus.it should be ${header.CamelFileNameProduced}..

On Wed, Apr 8, 2015 at 10:32 AM, Claus Ibsen <cl...@gmail.com> wrote:

> Hi
>
> You need to start from a file to have all those file mappings, eg
> <from uri="file:..."/>
> The file producer, eg to uri="file:" set a header with the name of the
> file that was saved,
>
> See section -
> Message Headers - File producer only
>
> At
> http://camel.apache.org/file2
>
> On Wed, Apr 8, 2015 at 3:01 AM, chaituu <ya...@gmail.com> wrote:
> > <from uri="direct:start"/>
> > <to uri="file:D://Test/?fileName=1.csv"/>
> >         <log message="header.Filepath:${file:absolute.path}"/>
> >   <to uri="velocity:Response.vm"/>
> >
> > why logger is not printing file:absolute.path?I want to print
> > file:absolute.path in the velocity template.
> >
> >
> >
> > --
> > View this message in context:
> http://camel.465427.n5.nabble.com/file-absolute-path-is-not-printing-value-tp5765449.html
> > Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
>
> --
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> Email: cibsen@redhat.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
> hawtio: http://hawt.io/
> fabric8: http://fabric8.io/
>



-- 
Thanks
Chaitanya

Re: file:absolute.path is not printing value

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

You need to start from a file to have all those file mappings, eg
<from uri="file:..."/>
The file producer, eg to uri="file:" set a header with the name of the
file that was saved,

See section -
Message Headers - File producer only

At
http://camel.apache.org/file2

On Wed, Apr 8, 2015 at 3:01 AM, chaituu <ya...@gmail.com> wrote:
> <from uri="direct:start"/>
> <to uri="file:D://Test/?fileName=1.csv"/>
>         <log message="header.Filepath:${file:absolute.path}"/>
>   <to uri="velocity:Response.vm"/>
>
> why logger is not printing file:absolute.path?I want to print
> file:absolute.path in the velocity template.
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/file-absolute-path-is-not-printing-value-tp5765449.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/