On Mon, Oct 1, 2012 at 5:07 PM, wanggang1 <[email protected]> wrote:
> Thanks for all your timely replies.
>
> I loaded template file from disk instead from classpath by using URI
> "velocity:file://myfolder/my_template.vm?propertiesFile=velocity/velocity.properties".
> But I have to use the full path to the template file.  I could not seem to
> get the Velocity property "file.resource.loader.path=/myfolder/" in the
> propertiesFile to work.
>

Can you try setting the loaderCache=false and contentCache=false.
http://camel.apache.org/velocity


> The most critical issue to me is that I could not dynamically change the
> template in the runtime if the templates are stored in file system.  I could
> do this dynamic swapping template file when I load templates from classpath
> by setting "CamelVelocityResourceUri" in the Message Header.  If the
> templates are stored in file system, whenever the "CamelVelocityResourceUri"
> header kicks into effect(that's when Camel could not load
> "velocity:file://myfolder/dummy.vm?propertiesFile=velocity/velocity.properties"),
> Camel try to load it from classpath, and "java.io.FileNotFoundException:
> Cannot find resource in classpath for URI: /myfolder/xyz.vm" is thrown.
>
> Is some where my setting not correct?  Please advice.
>
> Thanks
> Gang
>
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/camel-veloccity-property-configuration-tp5720235p5720314.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: [email protected]
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Reply via email to