velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sayed Hashimi" <Say...@housing.ufl.edu>
Subject RE: Macros - autoreload
Date Thu, 13 Jan 2005 19:14:21 GMT
Hi,
I had to set the following property:
services.VelocityService.velocimacro.permissions.allow.inline.to.replace.global = true

Looks like things are working now.
Thanks for the help!!!
Sayed Hashimi

-----Original Message-----
From: chenjian [mailto:chenjian@uvic.ca]
Sent: Thursday, January 13, 2005 1:54 PM
To: Sayed Hashimi; Velocity Users List
Subject: RE: Macros - autoreload


By the way, I think the conflicting part is not included in my previous email. 
Now, here is a more complete configuration:

// velocimacro configuration
ri.setProperty(RuntimeConstants.VM_LIBRARY, "macros/globalLibrary.vm");
// for some reason, the following two configurations will mess up the template 
rendering, so, commented out for now
//ri.setProperty(RuntimeConstants.VM_PERM_INLINE_LOCAL, "true");
//ri.setProperty(RuntimeConstants.VM_CONTEXT_LOCALSCOPE, "true");
      
// this setting is such that changing inline velocity macro will take effect
// WITHOUT restarting the web server!
ri.setProperty(RuntimeConstants.VM_PERM_ALLOW_INLINE_REPLACE_GLOBAL, "true");
ri.setProperty(RuntimeConstants.VM_LIBRARY_AUTORELOAD, "true");

Let me know if it works,

Jian

>===== Original Message From "Sayed Hashimi" <SayedH@housing.ufl.edu> =====
>Hi,
>Thanks for the response. I don't think this is happening because while Tomcat 
is running I'll change the .vm files that render the page. Then simply reload 
the pages, and I can see the changes. I'm still currently trying to determine 
why the macros are not reloading how they should. But honestly I'll just work 
around it until I figure it out.
>
>Thanks,
>Sayed Hashimi
>
>-----Original Message-----
>From: Florin Vancea [mailto:fvancea@maxiq.ro]
>Sent: Wednesday, January 12, 2005 1:16 AM
>To: Velocity Users List
>Subject: Re: Macros - autoreload
>
>
>Maybe Tomcat is deploying your app to some temp dir and loads it from there.
>For development I add to velocity.properties a high-priority file loader
>pointing to the original source directory. Thus, all I need is to change the
>.vm files in source dir.
>When generating for production I simply do not include the file loader and
>set caching to true.
>
>----- Original Message -----
>From: "Sayed Hashimi" <SayedH@housing.ufl.edu>
>To: <velocity-user@jakarta.apache.org>
>Sent: Tuesday, January 11, 2005 9:57 PM
>Subject: Macros - autoreload
>
>
>> Hi,
>> I'm relatively new to velocity. I'm defining some macros and changing them
>frequently. I would like to not have to restart Tomcat for these changes to
>take effect. So I set the following properties:
>>     velocimacro.library.autoreload = true
>>     file.resource.loader.cache = false
>> I then go to the page that is rendered by the template and view it, change
>the macro save changes to target directory, then reload the page. But no
>changes are taking place. I even logout of the site and log back in to see
>if that makes a difference but it doesn't. Does anyone know what the problem
>can be??? I've look through the documentation and it seems like I'm just
>missing something.
>>
>>
>> Thanks,
>> Sayed Hashimi
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
>>
>>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: velocity-user-help@jakarta.apache.org
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: velocity-user-help@jakarta.apache.org



---------------------------------------------------------------------
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