velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dirk Hoffmann <dh.disc...@web.de>
Subject Same macro name, different template
Date Fri, 06 Jun 2003 06:16:00 GMT
Hi out there,

I'm developing a web app with struts and velocity and got the following 
problem:

I have two templates each of which defines a macro of the same name and 
later calls the respective macro.

Looks like so:
    --- A.vm ---
   #macro ( mac )
    I am defined in A.vm
    #end
    #mac()

    --- B.vm ---
    #macro ( mac )
    I am defined in B.vm
    #end
    #mac()

After reloading the app into tomcat when I first go to A.vm and then to 
B.vm I only get A.vm. Apparently the macro definition is cached 
somewhere between the two requests or there is only one instance of 
velocity which handles both of them.

In the real app it's a bit more complicated: There is only one macro 
call in a third file, which is #parse()-ed by A.vm resp. B.vm.

Could someone please tell me how I can adjust velocity to reread the 
macro definition on subsequent requests.

Thanks a lot in advance!

Best regards
Dirk

Could someone tell


---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Mime
View raw message