velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sebastien Chassande-Barrioz <>
Subject Re: macros in other templates
Date Sat, 09 Mar 2002 16:06:23 GMT
Geir Magnusson Jr. wrote:

> So I would redo the above as
> VelocityEngine ve = new VelocityEngine();
> ve.setProperty( VelocityEngine.RUNTIME_LOG_LOGSYSTEM, this);
> ve.setProperty( VelocityEngine. FILE_RESOURCE_LOADER_PATH,
>            "/src/templates");
> ve.setProperty( "velocimacro.library", "file2.vm");
> ve.init();
> And that should work.

yes, and thank you for your help. It's perfact. In fact I specify a 
basic path for the FILE_RESOURCE_LOADER_PATH property, and a comma list 
of .vm file with relative path to the FILE_RESOURCE_LOADER_PATH for the 
VM_LIBRARY property:
ve = new VelocityEngine();
ve.setProperty(Velocity.FILE_RESOURCE_LOADER_PATH, "/src/templates");
ve.setProperty(Velocity.VM_LIBRARY, "mydir1/file1.vm,mydir2/file2.vm");

I have a last question: If two files (file1.vm & file2.vm) define a 
macro with the same name(toto), wich macro is called ? (toto in file1.vm 
  or toto in file2.vm ?)

Chassande-Barrioz Sebastien
INRIALPES - SIRAC/SARDES Team - ObjectWeb initiative
Mail job :
Phone :

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message