I've figured out what's going on........ I'm using IDEA coupled to Tomcat for my debugging. IDEA creates a deployment directory (exploded) each time you run a debug session, copies all your files (inlcuding the templates) into this directory, installs the servlet as an app in Tomcat and runs. Hence, any changes to my source templates are not being seen by Velocity because I'm running in a different directory tree.
Thanks for all your help. Steve -----Original Message----- From: Jochen Toppe [mailto:[EMAIL PROTECTED] Sent: 24 October 2004 14:27 To: Velocity Users List Cc: Steve O'Hara; Shinobu Kawai; Velocity Users List Subject: RE: Template Caching I have one veloc engine in my app and have my own resource loader coupled with the underlying cms's publication mechanism. Invalidation and reloading of the templates works like a charm. Even w/ the file resource loader which I also use. Ya must be doing something wrong. Download the source, hook up a debugger and you'll probably figure it out in 10 minutes. Software is just human, not a mystery :) To avoid browser cache, CRTL-reload or shift-reload (depending on the browser) will also do the trick. Cheers, jochen > Hi, > > > In my application, I used Velocity engine as a separate instance each > time for evaluating templates, basically non-singlton. I find the > performance is not that bad. > > What I did is that, I created a class called VelocityParser and have it > encapsulate the VelocityEngine class. Each time I want to render a > template, I used new VelocityParser().render(...), which in turn, new up a > VelocityEngine > object and does the real rendering. > > This way, there is no template caching issue. You can even turn on > template caching and make a singlton class afterwards by doing: > VelocityParser.newInstance().render(...). > > > Cheers, > > > Jian > > >> ===== Original Message From "Steve O'Hara" >> <[EMAIL PROTECTED]> >> > ===== > >> Hi Shinobu, >> >> >> Yeh, it's a mystery.......... >> To check that it definitely wasn't the browser cache, I set an expires >> header and no-cache control. Also, I switched from IE to Mozilla whilst >> Tomcat was running and it still >> showed the cached page. It does show any changed context data, which >> would also indicate that it isn't a browser issue. >> >> I suppose I'm getting to the poitn where I'll need to download the >> Velocity >> source and debug it.......? >> >> Steve >> >> >> >> -----Original Message----- >> From: Shinobu Kawai [mailto:[EMAIL PROTECTED] >> Sent: 23 October 2004 17:38 >> To: Velocity Users List >> Subject: Re: Template Cacheing >> >> >> >> Hi Steve, >> >> >>> Thanks for your notes, but I still can't turn the cacheing off. >>> >>> >>> This is my code............ >>> >> >> ## snip >> >> >>> What am I doing wrong ? >>> >> Hmm. AFAICS, nothing. Actually your code worked in my environment. >> (I use Tomcat 5.5, but that shouldn't matter.) Even more, >> FileResourceLoader doesn't cache by default. Could it be that your >> browser is caching, and not Velocity? >> >> Best regards, >> -- Shinobu Kawai >> >> >> -- >> Shinobu Kawai <[EMAIL PROTECTED]> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]