Re: Apache Velocity : Verify if all substitutions are made

2023-06-17 Thread Claude Brisson
The strict mode is set globally, you would need two instances of Velocity. Another direction is disabling the strict mode, and using an InvalidReferenceEventHandler, which lets you decide what to do on a case by case basis.   Claude On 17/06/2023 10:53, Debraj Manna wrote: Any suggestions

Re: Apache Velocity : Verify if all substitutions are made

2023-06-17 Thread Debraj Manna
Any suggestions on my last email? The same has been asked in stackoverflow also. https://stackoverflow.com/q/76487506/785523 On Wed, Jun 14, 2023 at 9:51 PM Debraj Manna wrote: > Strict mode will also suffice for my needs. I am new to Velocity. I am > setting the runtime.reference.strict to

Re: Apache Velocity : Verify if all substitutions are made

2023-06-14 Thread Debraj Manna
Strict mode will also suffice for my needs. I am new to Velocity. I am setting the runtime.reference.strict to true before init() like below final var engine = new VelocityEngine(); engine.setProperty("runtime.references.strict", "true"); engine.init(); I want the Strict mode to be enabled only

Re: Apache Velocity : Verify if all substitutions are made

2023-06-14 Thread Stefan Großhauser
Hello, isn't the "strict mode" already what you want? https://velocity.apache.org/engine/devel/user-guide.html#strict-rendering-mode best regards Stefan Von: Debraj Manna An: Gesendet: 13.06.2023 11:38 Betreff: Apache Velocity : Verify if all substitutions are made

Re: Apache Velocity : Verify if all substitutions are made

2023-06-13 Thread Debraj Manna
Thanks for replying. It will work in my use case. On Tue, Jun 13, 2023 at 7:14 PM Christopher Schultz < ch...@christopherschultz.net> wrote: > Debraj, > > On 6/13/23 05:38, Debraj Manna wrote: > > Can someone let me know how I can verify a velocity context against a > > template? Basically, I

Re: Apache Velocity : Verify if all substitutions are made

2023-06-13 Thread Christopher Schultz
Debraj, On 6/13/23 05:38, Debraj Manna wrote: Can someone let me know how I can verify a velocity context against a template? Basically, I want to throw some error if all variables are not substituted in the velocity template. For example, let's say I have a velocity template, card.vm card

Re: Apache Velocity : Verify if all substitutions are made

2023-06-13 Thread Debraj Manna
I am using velocity 1.7 On Tue, Jun 13, 2023 at 3:08 PM Debraj Manna wrote: > Can someone let me know how I can verify a velocity context against a > template? Basically, I want to throw some error if all variables are not > substituted in the velocity template. > > For example, let's say I