velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dhruva B. Reddy" <sledgehammer2...@yahoo.com>
Subject RE: Templates not refreshing
Date Fri, 13 Aug 2004 21:52:55 GMT
OK, I tried what was suggested below, but now I seem to have the
opposite problem.  No matter how I have the caching paremeters set, it
always picks up changes immediately.  Is there something about this I
need to know that's not in the documentation?

Thanks,
Dhruva

--- "White, Tim" <Tim.White@qwest.com> wrote:

> If I recall correctly, the cache refresh does not work in the webapp
> resource loader (see previous posts).  So, if your templates are
> coming from there, then that may be the issue - turn off template
> caching for the webapp loader...
> 
> HTH,
> 
> Tim
> 
> -----Original Message-----
> From: Dhruva B. Reddy
> To: Velocity Users Mailing List
> Sent: 7/29/2004 5:37 PM
> Subject: Templates not refreshing
> 
> We are using Velocity 1.4 in a web application (but in custom tag lib
> rather than with the  VelocityViewServlet), and cannot seem to get it
> to pick up templates after they have been changed (i.e., when viewing
> the page with the template in question, it always reads as it was
> when
> the application was started).
> 
> The tag does the following to get the template:
> 
> t = Velocity.getTemplate(settings.get("templateDir") +
>                                              "/" + page + ".html");
> 
> where the "page" variable is 
> 
> The properties with which Velocity is initialized follow.  Can
> someone
> tell me what I should look for?
> 
> Thanks,
> Dhruva
> 
> # specify resource loaders to use
> resource.loader = class, webapp, file
> 
> # NOTE: Leave cache set to false while developing - change to true
> when
> deploying to production.
> 
> # for the loader we call 'class', use the ClasspathResourceLoader
> class.resource.loader.description = Velocity Classpath Resource
> Loader
> class.resource.loader.class =
> org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
> class.resource.loader.cache = true
> class.resource.loader.modificationCheckInterval = 60
> 
> # for the loader we call 'webapp', use the WebappLoader
> webapp.resource.loader.description = Velocity Webapp Loader
> webapp.resource.loader.class =
> org.apache.velocity.tools.view.servlet.WebappLoader
> webapp.resource.loader.cache = true
> webapp.resource.loader.modificationCheckInterval = 60
> 
> # for the Velocity templates...
> file.resource.loader.description = Velocity template
> file.resource.loader.class =
> org.apache.velocity.runtime.resource.loader.FileResourceLoader
> file.resource.loader.path = <absolute path to templates>
> file.resource.loader.cache = true
> file.resource.loader.modificationCheckInterval = 5
> 
> # log invalid template references?
> # set this to false to have a quieter velocity.log
> runtime.log.invalid.reference=false
> 
> # velocimacro settings
> velocimacro.library = globalMacros.vm
> velocimacro.permissions.allow.inline.to.replace.global=true
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> velocity-user-help@jakarta.apache.org
> 
> 



		
__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail

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