Accessing Java System properties using Velocity

2005-03-29 Thread Pras Jayaraman
Hi, How do I read System.getProperty(foo) within a Velocity file? I need this to read a property and take corresponding action at the time of initialization of my application. I can not put this code in any of the methods within my Servlets and call the corresponding method from my Velocity as

Re: templs in XML: how to hande input/@checked=checked

2005-03-29 Thread Will Glass-Husain
Hi Robert, I've had some similar issues. When my XML editor (or HTML editor) requires the source to be well-formed, I just use the first case you suggestion. The other alternative is to use a macro to abstract out the entire input block. It's not well-formed XML, but it's more easily

Re: Accessing Java System properties using Velocity

2005-03-29 Thread Shinobu Kawai
Hi Pras, How do I read System.getProperty(foo) within a Velocity file? I need this to read a property and take corresponding action at the time of initialization of my application. I can not put this code in any of the methods within my Servlets and call the corresponding method from my

Velocity Iterator warning

2005-03-29 Thread Chacko, Raj
Hi All How to handle this sort of warning? Velocity [warn] Warning! The iterative is an Iterator in the #foreach() loop at 0,0] in template /data.vm. Because it's not resetable, if used in more than once, this may lead to unexpected results. Thanks Raj

Re: Velocity Iterator warning

2005-03-29 Thread Barbara Baughman
It's just a warning. If you send an Iterator object to a foreach loop, it will work exactly once in the template. If you are only using it once, then that's not a problem. In best practice, you would always try to send an array or an object that implements java.util.Collection to a foreach