It looks like this is the same as
https://issues.apache.org/jira/projects/VELOCITY/issues/VELOCITY-952 and is
a much bigger issue.
See also
https://issues.apache.org/jira/projects/VELOCITY/issues/VELOCITY-968
On Wed, Sep 27, 2023 at 6:03 PM Christopher Schultz <
ch...@christopherschultz.
All,
(This is all in the context of Velocity 1.7, but I'm not sure anything
has changed through 2.x.)
Sometimes you want to call a static method. Past workarounds are ugly
but get the job done. For example:
#set($string = "")
$string.format($locale, "format string", args)
I have a case
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
ng to get the internal name, you'd probably be better off
> injecting the name yourself. You normally have access to the name of the
> template around the same time that you set up the context.
>
>
>> On Wed, May 3, 2023 at 11:42 AM Christopher Schultz <
>> ch...@chris
All,
I'd like too be able to get access to the name of the template currently
being rendered. It looks like that information should be in the
VelocityContext being used, but I'm having trouble getting a reference
to that.
This is in a webapp situation, and I'm using velocity-tools so I
Hello,
I need to be able to initialize and use a VelocityEngine from within a
web application but without the benefit of using Velocity*Servlet, etc.
in order to do the setup.
I'm already using Velocity as the templating engine for this web
application and I need to keep this usage
All,
On 6/20/22 13:54, Christopher Schultz wrote:
On 6/20/22 13:40, Christopher Schultz wrote:
I have a process where I'd like to use a global macro library but also
allow the individual templates to override the macros if necessary.
My code looks something like this:
// == One-time setup
All,
On 6/20/22 13:40, Christopher Schultz wrote:
I have a process where I'd like to use a global macro library but also
allow the individual templates to override the macros if necessary.
My code looks something like this:
// == One-time setup
Properties props = new Properties
All,
I have a process where I'd like to use a global macro library but also
allow the individual templates to override the macros if necessary.
My code looks something like this:
// == One-time setup
Properties props = new Properties();
properties.setProperty("velocimacro.inline.allow",
All,
I happen to be using tools-2.0 but it doesn't look like the code has
changed much up through today.
I have a subclass of VelocvityViewServlet I've been using for years that
further customizes things for my environment. I'd now like to be able to
provide a custom set of Ptoperties
All,
Velocity v1.7
openjdk version "16.0.2" 2021-07-20
OpenJDK Runtime Environment (build 16.0.2+7-67)
OpenJDK 64-Bit Server VM (build 16.0.2+7-67, mixed mode, sharing)
(Yes, I realize Velocity 1.7 is old but we haven't had time to evaluate
500+ templates for compatibility with later
All,
I've got a template where a variable may be either undefined or false
(or other values) and I'm specifically trying to determine if it's
*false*. My template code looks like this:
#if($value && true == $value)
do stuff
#elseif(false == $value)
do other stuff
#end
I don't seem to be
it) but I won't
have anything to test it with other than the existing unit tests.
- -chris
> On Wed, Feb 5, 2020 at 9:55 AM Christopher Schultz <
> ch...@christopherschultz.net> wrote:
>
> All,
>
> This may be an uncommon configuration, but I just upgraded from
> veloc
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256
All,
This may be an uncommon configuration, but I just upgraded from
velocity-tools-2.0 with commons-beanutils-1.9.3 to
commons-beanutils-1.9.4 and all my stuff broke.
I spent a few hours tracking it down and I happened to have my toolbox
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256
All,
I know this has been asked before but I've never really found a
satisfactory answer: what's the best way to put a literal tab into a
VTL template?
I don't want to use:
context.put("tab", "\t");
And then use $tab in my template, because
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256
All,
If I want to create a new empty array/collection, I can do something
like this:
#set($array = [])
If I want to create a new Map, I can do this:
#set($map = {})
Is there a way to create a new Set?
I'd like to use a set because:
1. I want
0) character? Or maybe RS (Record Separator) 0x1e?
Does anyone have any preference?
Also, what's the best way to make this backward-compatible?
-chris
> On Mon, Aug 21, 2017 at 6:00 PM, Christopher Schultz <
> ch...@christopherschultz.net> wrote:
>
> All,
>
> I'm no
added string-formatting :)
Thanks,
-chris
> On 13/10/2017 23:39, Christopher Schultz wrote:
>> All,
>>
>> Before I spend a whole lot of time on this, is there a dead-simple way
>> in VTL + stock Velocity Tools to take a byte[] reference and print-out a
>> hex-renderi
All,
Before I spend a whole lot of time on this, is there a dead-simple way
in VTL + stock Velocity Tools to take a byte[] reference and print-out a
hex-rendering of it? Like:
Java (roughly):
byte[] bytes = new byte[] { 0xa, 0xb, 0x12 };
ctx.put("bytes", bytes);
template.render(ctc);
VTL:
my
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256
All,
I'm not sure if I've used ValueParser.getStrings before (really,
ParameterParser.getStrings, in this case), but I'm surprised by what
is happening. Is this expected?
Request POST parameters:
foo=bar=This, is a comment.
Velocity template
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256
All,
I just spent an inordinate amount of time tracking-down a
date-formatting problem in one of our applications. The real root
cause of the problem was that some silly programmer did something like
this:
That looked perfectly fine to me, but
All,
I've been using StrutsLinkTool with Struts 1.x for a very long time, and
I'm surprised this is the first time this has come up.
I'd like to check for the existence of a forward definition and, if it
exists, use it. Otherwise, I'd like to fall-back to a default.
Basically, I'm taking a
All,
Using Velocity-Tools 2.0.
I've got a resource bundle with the following message in it:
text.patient.questionnaires.available=There {0,choice,0#are no
questionnaires|1#is one questionnaire|1'{0}''
questionnaires} ready to take
(That's all on one single line, in case my emailer wraps it, or
Mike,
On 9/1/15 8:51 AM, Mike Kienenberger wrote:
> As far as I know, case sensitivity depends on your filesystem
> (operating system) and not on Velocity.
>
> Windows and Mac OS X are case-insensitive. UNIX-based file systems
> are generally case-sensitive, although not all.
It's worth
.
Thanks,
-chris
On Fri, Dec 5, 2014 at 8:20 PM, Christopher Schultz
ch...@christopherschultz.net wrote:
All,
I'm using StrutsLinkTool and I have a forward defined in
struts-config.xml that is a complete URL (like
http://www.google.com/?q=foo;). In my page, I have this:
a href=$link.forward
All,
I'm using StrutsLinkTool and I have a forward defined in
struts-config.xml that is a complete URL (like
http://www.google.com/?q=foo;). In my page, I have this:
a href=$link.forward('my-link-name')link text/a
The page this link is on is served via HTTPS with no port number, so of
course
-config.xml and (b) point to
resources external to our web application.
Thanks,
-chris
On Fri, Dec 5, 2014 at 8:20 PM, Christopher Schultz
ch...@christopherschultz.net wrote:
All,
I'm using StrutsLinkTool and I have a forward defined in
struts-config.xml that is a complete URL (like
http
All,
ListTool is marked as deprecated because Velocity 1.6 and later treat
arrays and lists as first-class collections and can perform appropriate
operations on them.
One thing it's not easy to do is determine if an object is an List or an
Array.
I have something hacked-together using ClassTool
of course makes no sense).
Any other suggestions? If not, I'll do what I have below plus checking
against '['.
Thanks,
-chris
On 06/26/2014 03:27 PM, Christopher Schultz wrote:
All,
ListTool is marked as deprecated because Velocity 1.6 and later treat
arrays and lists as first-class
All,
On 3/13/14, 5:55 PM, Christopher Schultz wrote:
All,
On 3/10/14, 2:15 PM, Christopher Schultz wrote:
All,
I've just discovered that I can't connect using jconsole, VisualVM,
YourKit, etc. when VelocityViewServlet has been enabled. I never noticed
this before because I haven't been
Claude,
On 3/11/14, 4:57 AM, Claude Brisson wrote:
The session toolbox is always created by default, to let users access
standard session tools.
There is a create-session parameter you can use for this purpose, see:
http://velocity.apache.org/tools/releases/2.0/config.xml.html
Is it
All,
I've just discovered that I can't connect using jconsole, VisualVM,
YourKit, etc. when VelocityViewServlet has been enabled. I never noticed
this before because I haven't been using jconsole very much, and I don't
think I've tried to profile recently.
I have a quick summary of what's going
All,
I have a template where I'd like to take some text in a variable and do
parametric-replacement like new
MessageFormat(format).format(replacements) might do.
I'm already using Velocity Tools/Struts to great effect with pre-defined
messages in properties files, but this data needs to come
All,
On 2/21/14, 12:48 PM, Christopher Schultz wrote:
All,
I have a template where I'd like to take some text in a variable and do
parametric-replacement like new
MessageFormat(format).format(replacements) might do.
I'm already using Velocity Tools/Struts to great effect with pre-defined
Nathan,
On 2/21/14, 1:42 PM, Nathan Bubna wrote:
Yes, the conflict was intentional. The idea was that people using
VelocityStruts would default to using Struts' message support, so we should
default $text to use that. Whether that is still valid reasoning, i don't
know. I haven't used Struts
Bump. Anyone?
On 1/30/14, 8:30 PM, Christopher Schultz wrote:
All,
I just noticed this warning in my startup logs:
Jan 30, 2014 8:21:33 PM org.apache.catalina.core.ApplicationContext log
INFO: Velocity [trace] Searching for configuration at: /WEB-INF/tools.xml
Jan 30, 2014 8:21:33 PM
All,
Umm... I probably should have noticed this long before today, but I just
observed a problem with my configuration and I wanted to make sure that
my (new) understanding of the DateTool is correct.
So, I had DateTool configured to be an application level tool. That
appears to have been a
All,
I just noticed this warning in my startup logs:
Jan 30, 2014 8:21:33 PM org.apache.catalina.core.ApplicationContext log
INFO: Velocity [trace] Searching for configuration at: /WEB-INF/tools.xml
Jan 30, 2014 8:21:33 PM org.apache.catalina.core.ApplicationContext log
INFO: Velocity
comment things so that we can document which
else/end goes with which if/else.
Odd that sometimes we are getting those extra # or ## at the end of
lines in the output.
Any ideas are appreciated.
Thanks,
-chris
On 8/29/13 1:55 PM, Christopher Schultz wrote:
All,
Velocity 1.7, Oracle JDK 1.7.0_25
All,
I've searched the archives for while capabilities in Velocity, and
mostly the answers have been things like that's beyond the scope of
Velocity... you want a real programming language for that.
I'd like to do something that naturally would use a while loop, but
perhaps someone can offer an
All,
I've been doing some profiling looking for wasted memory in my webapp
and I've discovered that org.apache.velocity.runtime.parser.Parser
contains a few members that appear to be (essentially) duplicates.
First, there is the velocharstream member which is a
VelocityCharStream. Then, there is
On Fri, Apr 12, 2013 at 10:41 AM, Christopher Schultz
ch...@christopherschultz.net wrote:
All,
I've been doing some profiling looking for wasted memory in my webapp
and I've discovered that org.apache.velocity.runtime.parser.Parser
contains a few members that appear to be (essentially) duplicates
Jan,
On 9/21/12 2:45 AM, Jan Algermissen wrote:
looking at the code yesterday, I saw that Velocity uses a number of
Serialized classes (e.g. the SerializedMap in ResourceCache).
I would like to replace all relevant classes to avoid serialization
completely.
Do you mean avoid all
Doug,
On 9/12/12 5:22 PM, Doug Breaux wrote:
On 9/12/2012 2:10 PM, Christopher Schultz wrote:
Doug,
On 8/14/12 5:20 PM, Doug Breaux wrote:
Both the VelocityTools Tools Usage Summary and the DateTool Javadoc seem
to indicate a configuration mechanism for setting a TimeZone, but I
simply
Nathan,
On 7/11/12 1:35 PM, Nathan Bubna wrote:
On Wed, Jul 11, 2012 at 9:58 AM, Christopher Schultz
ch...@christopherschultz.net wrote:
Nathan,
...
See VELOCITY-731 and VELOCITY-692 and others...
Those were good to read: 1.6 introduced more consistent (if slower)
treatment of references
All,
I recently started getting intermittent OOMEs in my webapp that seem to
be completely recoverable. The stack traces look like this:
java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Arrays.java:2882)
at
Nathan,
On 7/11/12 12:28 PM, Nathan Bubna wrote:
Just set:
directive.if.tostring.nullcheck = false
As always, thanks for the quick, response. I had gotten this far in my
code reading:
ASTReference.evaluate():
public boolean evaluate(InternalContextAdapter context)
throws
Nathan,
On 7/11/12 1:35 PM, Nathan Bubna wrote:
Actually, i still consider [the toString behavior] correct for a template
language (which
is not the same as a scripting language) to treat render-as-empty as
false in an #if. So, my hope for 2.0 was to not to remove that
behavior, but to
Nathan,
On 4/26/12 11:58 PM, Nathan Bubna wrote:
parser.pool.size
I'll check that out.
is this in 1.7?
Yes. Velocity 1.7 and Velocity Tools 2.0.0 (with a few unrelated patches).
i thought we trimmed a lot of the excess between 1.5
and 1.6, but if we can trim more, that'd be swell.
I'll
Nathan,
On 3/7/12 12:37 PM, Nathan Bubna wrote:
At last decision, we set the current development versions for both at
JDK 1.5+. But considering their languorous pace, if you wanted to
make a strong case for 1.6+, it would probably not be resisted.
Nah... just wanted to use CharSequence
Nathan,
On 3/6/12 9:46 AM, Nathan Bubna wrote:
Not to pick at semantics, but the xhtml feature came after the
ValidatorTool, so i'd call it an oversight that the ValidatorTool was
not changed to respect it.
Okay, not a problem... I can fix it :)
What do you think the best fix would be?
It
All,
On 3/6/12 9:46 AM, Nathan Bubna wrote:
Not to pick at semantics, but the xhtml feature came after the
ValidatorTool, so i'd call it an oversight that the ValidatorTool was
not changed to respect it.
https://issues.apache.org/jira/browse/VELTOOLS-152
-chris
signature.asc
Description:
Antonio,
On 2/1/12 3:36 AM, Antonio Petrelli wrote:
2012/2/1 Christopher Schultz ch...@christopherschultz.net
Antonio,
On 1/31/12 6:11 PM, Christopher Schultz wrote:
No problem: just check it out from svn (done) and build:
I forgot to mention that I downloaded the Velocity 1.7 tag. I
All,
I'm having trouble building with the new Maven build system.
$ svn info
Path: .
URL: https://svn.apache.org/repos/asf/velocity/tools/branches/2.0.x
Repository Root: https://svn.apache.org/repos/asf
Repository UUID: 13f79535-47bb-0310-9956-ffa450edef68
Revision: 1238670
Node Kind: directory
Abc,
On 1/24/12 1:42 PM, abc12345 wrote:
Thanks for the Quick reply, Any Idea when 2.x is scheduled for release.
Are you waiting for a specific feature? Or, are you suffering from
version-itis?
-chris
signature.asc
Description: OpenPGP digital signature
Johannes,
On 1/31/12 10:48 AM, Johannes Homuth wrote:
Sorry but than you will have to learn it. So bothered it may be, but you
will have to understand maven if you have to work with it.
*sigh*
Would you care to point me in the right direction, or did you just want
to troll me?
Thanks,
-chris
Johannes,
On 1/31/12 10:54 AM, Johannes Homuth wrote:
Maybe a little hint, you should deal with Resource-Filtering
I was thinking that maybe whoever built the testing goal would have
thought of that. I'm not trying to configure Maven to build
velocity-tools. I'm just trying to use what's in SVN
Nathan,
On 1/9/12 11:30 PM, Nathan Bubna wrote:
i'm just trying to figure out what your
tools.view.servlet.layout.directory setting is.
It's the default, which is /layout relative to the web app root.
Perhaps this is only a problem if the webapp.resource.loader.path=/, but
I believe that is
Nathan,
On 10/31/11 11:45 AM, Nathan Bubna wrote:
In that case, the documentation is wrong. Leading whitespace is only
trimmed from in front of a #set directive that has nothing after it.
I'm not aware of any other case where leading whitespace is trimmed.
Is this something that could be
All,
The User Guide says that Velocity's behavior is to gobble-up excess
whitespace and offers this example:
Velocity's behaviour is to gobble up excess whitespace. The preceding
directive can be written as:
Send me
#set( $foo = [$10 and ,a pie] )
#foreach( $a in $foo )
$a
#end
please.
or as
Nathan,
On 7/27/2011 10:55 AM, Nathan Bubna wrote:
[I]t means that after you turn the url into a java.net.URI (which
does the parsing for you) and you are copying out the sections of the
URI into the current LinkTool instance, you don't want to override
things in the currents LinkTool that
All,
I've been trying to switch my templates from using
LinkTool.addIgnore()addAllParameters() to use
LinkTool.addRequestParamsExcept(String... allButThese) but I'm having a
bit of difficulty with it.
If I call addRequestParams() with no argument, things work as expect. On
the other hand,
Nathan,
On 7/27/2011 4:40 PM, Nathan Bubna wrote:
On Wed, Jul 27, 2011 at 11:59 AM, Christopher Schultz
ch...@christopherschultz.net wrote:
All,
I've been trying to switch my templates from using
LinkTool.addIgnore()addAllParameters() to use
LinkTool.addRequestParamsExcept(String
All,
On 7/27/2011 4:06 PM, Christopher Schultz wrote:
I do see /a/ bug in addAllParameters, but it doesn't account for the
problem I'm seeing.
Okay, I was wrong, the ignores list *is* being updated by addQueryData
(indirectly through view.tools.LinkTool.setParam).
What I'm seeing
Fixed in 2.0.x branch.
On 7/27/2011 4:53 PM, Christopher Schultz wrote:
All,
On 7/27/2011 4:06 PM, Christopher Schultz wrote:
I do see /a/ bug in addAllParameters, but it doesn't account for the
problem I'm seeing.
Okay, I was wrong, the ignores list *is* being updated by addQueryData
Fixed in 2.0.x branch.
On 7/27/2011 4:49 PM, Christopher Schultz wrote:
Nathan,
On 7/27/2011 4:40 PM, Nathan Bubna wrote:
On Wed, Jul 27, 2011 at 11:59 AM, Christopher Schultz
ch...@christopherschultz.net wrote:
All,
I've been trying to switch my templates from using
LinkTool.addIgnore
All,
As I get further into the testing of Velocity Tools 2.0, I'm finding
that the addAllParameters method isn't working as it used to.
The use case here is something like this:
$forward = $link.setRelative('foo').addIgnore('xyz')
a href=$forward.addQueryData('x', 'y').addAllParameters()link
All,
We use StrutsLinkTool pretty much everywhere and had been relying on the
previous behavior (tools 1.4) of StrutsLinkTool.setForward(String) which
takes a reference to a Struts-defined forward which is basically just
a URL.
In the past, we were able to define a URL in Struts like this:
All,
On 7/26/2011 5:23 PM, Christopher Schultz wrote:
As I get further into the testing of Velocity Tools 2.0, I'm finding
that the addAllParameters method isn't working as it used to.
I forgot to say what is happening. It appears that the
addAllParameters call isn't actually accomplishing
All,
On 7/26/2011 5:23 PM, Christopher Schultz wrote:
As I get further into the testing of Velocity Tools 2.0, I'm finding
that the addAllParameters method isn't working as it used to.
Something very subtle is happening, here. The following all work as I
expect them to:
p
\$link.setRelative
All,
Velocity Tools trunk README.txt file says that building is easy using
ant: just type ant. Unfortunately, there is no build script, etc. so
ant fails of course.
I'd like to submit a patch but I need to build and test before I do
that. I don't know a thing about Maven. :)
How does one build
Claude,
On 7/21/2011 12:21 PM, Claude Brisson wrote:
tools/trunk (future 2.1) now depends on velocity-2.0.0-SNAPSHOT and is
built with maven
Aah, I didn't realize that. Good to know.
tools/branches/2.0.x still depends on velocity-1.x and is built with ant
I'll switch to the branch, since I
Claude,
On 7/21/2011 12:21 PM, Claude Brisson wrote:
trunk now uses maven
Could you update the README.txt file to indicate the new build process?
If it's just install maven; type 'mvn' then that's fine, too :)
Thanks,
-chris
signature.asc
Description: OpenPGP digital signature
Nathan,
On 7/21/2011 1:06 PM, Christopher Schultz wrote:
I'll go ahead and commit everywhere.
Hmm... I'm having trouble building trunk. That could be due to a number
of environmental factors including wrong maven version (I grabbed
3.0.3), wrong maven use (I tried mvn compile), or missing local
Dave,
On 7/21/2011 12:37 PM, laredotornado wrote:
final InputStream resourceStream =
Thread.currentThread().getContextClassLoader().getResourceAsStream(velocity.properties);
Should that have a leading / in the path?
The above dies because the resourceStream is null. Any ideas
Nathan,
On 7/21/2011 1:36 PM, Nathan Bubna wrote:
On Thu, Jul 21, 2011 at 10:31 AM, Christopher Schultz
ch...@christopherschultz.net wrote:
Dave,
On 7/21/2011 12:37 PM, laredotornado wrote:
final InputStream resourceStream =
Thread.currentThread().getContextClassLoader
All,
I've found an expression that parser in Velocity 1.4 but does not in
Velocity 1.7:
#set($linkedExpression =
$linkedExpression.replaceAll('(?:fact|response|freeResponse)\(\s*([0-9]+)\s*[^)]*\)',
a
href=\$link.setForward('clinician-edit-question')?id=${dollar}1\${dollar}0/a))
(That should be
Nathan,
On 7/19/2011 7:55 PM, Nathan Bubna wrote:
Problems with mailto: and $link.uri() should probably go into JIRA,
those ought to work.
https://issues.apache.org/jira/browse/VELTOOLS-143
-chris
signature.asc
Description: OpenPGP digital signature
Nathan,
On 7/20/2011 12:06 PM, Nathan Bubna wrote:
there is a 1.x branch, but it is unlikely to have future releases (at
least, i'm not going to work on them). make sure it is fixed in the
trunk. if you feel like being thorough, backport to the 1.x branch.
What about getting it published to
Nathan,
On 7/1/2011 11:27 AM, Nathan Bubna wrote:
As far as i know, that's all uncharted territory. But you're not the
first to ask about ways to programmatically clear the cache. I just
don't think anyone has ever worked on support for this.
Okay. Now that I'm serious about upgrading to
which I'll have to investigate.
I'm reporting these because the Velocity Tools upgrade page basically
says drop-in the new JAR and report any problems to the users list.
The current release build is not drop-in replaceable. :(
Thanks,
-chris
On 7/19/2011 5:15 PM, Christopher Schultz wrote:
All
All,
On 7/19/2011 5:39 PM, Christopher Schultz wrote:
In addition to LinkTool.setRelative, LinkTool.setURI was also removed.
Also LinkTool.addQueryData, used dozens of times in all my templates.
Sheesh, what happened?
Looks like LinkTool.param(String,Object) is what I'm looking for.
I can't
Nathan,
On 6/2/2011 4:17 PM, Nathan Bubna wrote:
2011/6/2 Șergiu Dumitriu ser...@xwiki.com:
On 06/02/2011 05:55 PM, Nathan Bubna wrote:
Hi Andreas,
Sorry to have inconvenienced you with this change. The old behavior
was causing problems and had some notable flaws (see my discussion of
All,
So, two things before I get started:
1. I know I have access to the source. I know I'm a committer.
2. I'm using Velocity 1.4
I've recently been doing a lot of memory profiling of my webapp and it
looks like Velocity is responsible for a lot of stuff hanging around in
memory.
Of course,
a bit of memory there as well.
Sorry for the laundry list. I've just buried in the profiler right now
and I can see all of it. ;)
Thanks,
-chris
On 5/11/2011 4:48 PM, Christopher Schultz wrote:
All,
So, two things before I get started:
1. I know I have access to the source. I know I'm
All,
Ha ha, just saw bug VELOCITY-801.
I'll comment on that bug, too.
-chris
signature.asc
Description: OpenPGP digital signature
Nathan,
On 5/11/2011 5:15 PM, Nathan Bubna wrote:
A lot of this work was done already between 1.5 and 1.6, as i recall.
I could have sworn you participated in some of those discussion too.
Maybe... I'll have to look at the mailing list archives. :)
I know a lot of work was done in 1.6 on
Nathan,
On 2/16/2011 5:47 PM, Nathan Bubna wrote:
all relevant things were fixes for these problems in subsequent
versions. seriously, i can't remember anything related to this
except the fixes. tally one for reasons to upgrade.
Gotcha.
please, if i were omnipotent, i would strike all
All,
I'm using Velocity 1.4 (yeah, I know) and I'm getting these warnings:
INFO: Velocity [warn] Warning! The iterative is an Iterator in
the #foreach() loop at [0,0] in template [my template]. Because it's
not resetable, if used in more than once, this may lead to unexpected
results.
All,
I'm trying (for the first time!) to create a mailto: link in my webapp
and I decided to see what would happen if I used the LinkTool (really
StrutsLinkTool) to generate it. Something like this (newlines added for
readability):
a href=$link.setURI(mailto:f...@bar.com;)
Nathan,
On 1/7/2011 12:52 PM, Nathan Bubna wrote:
looks like 1.4 code. have you checked on how Tools 2 encodes links?
Forgot to mention that I'm on velocity-1.4 and velocity-tools-1.4 (plus
a few of my own old patches).
I should try to upgrade to velocity-tools-2.0 since it does not
All,
Using Velocity 1.4, I'm trying to create an in-page hash for quick
lookups. I have the following syntax:
#set($hash = { })
This is causing an error:
org.apache.velocity.exception.ParseErrorException: Lexical error:
org.apache.velocity.runtime.parser.TokenMgrError: Lexical error at line
6,
Jian,
On 11/17/2010 4:19 PM, jian chen wrote:
It seems to me that in java, Iterator can not be modified during the
iteration loop. It is not particular to Velocity though.
http://download.oracle.com/javase/6/docs/api/java/util/Iterator.html#remove()
You may need to update your interview
Nathan,
On 11/17/2010 4:44 PM, Nathan Bubna wrote:
On Wed, Nov 17, 2010 at 1:15 PM, Christopher Schultz
ch...@christopherschultz.net wrote:
All,
I'd like to mutate a collection during template evaluation --
essentially, I'd like to call Iterator.remove() during a loop. Is that
possible
Nathan,
On 9/7/2010 11:23 AM, Nathan Bubna wrote:
inline, local macros. only those macros have threadsafety issues.
and even then, only when they are being repeatedly parsed under load
(i.e. template caching off or repeated use of evaluate with the same
log tag). so i mostly recommend that
Nathan,
On 9/7/2010 11:36 AM, Nathan Bubna wrote:
according to both the code and javadocs, that's what it is supposed to
do when you pass a relative url into that method. there isn't really
a method in Tools 1.4's LinkTool that does what you want. all
setAbsolute can do in 1.4 is:
Antonio,
On 9/2/2010 10:02 PM, Kitching, Simon wrote:
On Wed, 2010-09-01 at 07:14 -0700, Nathan Bubna wrote:
On Tue, Aug 31, 2010 at 10:02 PM, Kitching, Simon
simon.kitch...@airnz.co.nz wrote:
Hi All,
I've got some code using Velocity which failed under load. Can you
confirm that the
All,
I'm having a problem using LinkTool (StrutsLinkTool, actually) in
Velocity Tools 1.4. What I want is a fully-qualified URL without the
current webapp's context path in the URL. Something like this:
http://host/path/to/resource
What I'm getting from LinkTool.setAbsolute('/foo/bar') is this:
Ryan,
This is more of a user question than a dev question, but I'll answer
it, anyway (and cross-post to the user list).
ryan19 wrote:
Does anyone know can you convert a String to int in velocity code?
Velocity does not support this directly, but Velocity-Tools does (it's a
small but
John,
I'm answering your question back on the list so other folks can see it.
[EMAIL PROTECTED] wrote:
Sorry Christopher, quick question. How do you reference the velocity
tool? Like to you put some import in the .vm file? This apache
velocity stuff is all new to me.
That depends on how you
1 - 100 of 130 matches
Mail list logo