Re: velocity.properties

2005-01-17 Thread Ravikanth L
Hi Jecki, If you are looking for all the properties that can be configured in velocity.properties file, you can get that sample velocity.properties file in you velocity.jar file. Anyhow here are the contents what I have in my velocity.properties which came in the jar.

Creating objects in template using new keyword

2005-02-28 Thread Ravikanth L
Hi All, I would like to create a object reference in template using new keyword like what we do in java String obj = new String() I need to put RenderTool instance in context and use it to fix some problem. I know that i can put it to context from the java code where the template is being

Re: Creating objects in template using new keyword

2005-03-03 Thread Ravikanth L
Hi Shinobu, Thank you very much for the information. It was a simple java code change only to add two new instances to the context from the java code, but i wanted to avoid java code change. -- With Regards, Ravikanth.L - To

while loop

2005-09-14 Thread Ravikanth L
Hi All, Like #foreach does velocity has support for while loop. I am supposed to use a custom api which is having methods like hasMoreSubElements(), nextSubElement() etc... on given element. Usually we will use while loop for these scenarios. Let me know if we can use #while etc...if so a

Problems with recurse method exception of RenderTool

2005-09-15 Thread Ravikanth L
Hi All, Can anyone let me know when will the recurse method of RenderTool throws exception. Means what are the scenarios for the recurse method to throw an exception. I am dynamically creating variables and assigning them values in the template like #foreach($subElementName in

Re: Hacking Velocity

2005-09-16 Thread Ravikanth L
Hi Will, I was trying the following example (to create a custom class instance dynamically in the template) given in the slides ## Let's do some mischief and instantiate an arbitrary class #set ($fileclass = $obj.Class.forName(java.io.File)) #set ($stringclass =

Valid characters for value in VTL - urgent

2005-09-19 Thread Ravikanth L
Hi All, I would like to know the valid characters that we can use for a value in VTL. I tried the following #set($var = My string with special chars##) It throws ParseErrorrException as: org.apache.velocity.exception.ParseErrorException: Lexical error:

Re: Valid characters for value in VTL - urgent

2005-09-19 Thread Ravikanth L
, Christoph Reck [EMAIL PROTECTED] wrote: Hi, Ravikanth L wrote: Hi All, I would like to know the valid characters that we can use for a value in VTL. I tried the following #set($var = My string with special chars##) Velocity defines a line-comment starting with the characters

Re: Valid characters for value in VTL - urgent

2005-09-20 Thread Ravikanth L
Hi Christoph, Thanks a lot for replying back. Its a good idea to filter/escape all suspicious characters, i will follow your suggestion. Anyhow i am going to vote for the bugs related to it. Thanks, With Regards, Ravi On 9/19/05, Christoph Reck [EMAIL PROTECTED] wrote: Hi Ravikanth,

Re: Disable echo in VTL

2006-02-07 Thread Ravikanth L
Hi, Use as below #foreach($elem in $rootelem.getChildren())## #set ($elemname = $elem.getName())## #set( $sometext = $userprops.get($elemname) )## #set($tempVariable = $elem.setText( $sometext ))## #end## to ignore the return value from setText, just pretend as assigning to a variable (