velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Veit Guna <>
Subject Setting context value from template broken in 2.0
Date Tue, 05 Dec 2017 22:46:00 GMT

I just gave 2.0 a testdrive and some issues occurred to me.

a) Until 1.7 I could use

#set($subject = "Hey Buddy")

To pass back context values to the caller (java code). I could simply
get it from the Map:


Now this doesn't work anymore. The key is not contained in the context
after the template has been processed.
Is this by intention? Is there another way of passing back values from
the template?

b) org.springframework.ui.velocity.VelocityEngineFactoryBean doesn't
work anymore if configured like this:

<property name="resourceLoaderPath" value="classpath:mail-templates" />

or this (leaving it out completely results in the same):

<property name="overrideLogging" value="true" />

Spring uses an old ResourceLoader for classpath scanning (can be fixed
by using velocitys own). Also it uses
the old *Chute logger class. Both resulting in appropriate exceptions
not finding matching classes.

As Spring announced to drop Velocity Support with 5, this is maybe not a
topic for you guys anymore.
But it would have been nice to keep these classes for a while to not
break existing projects :).

So let's forget about b). Does anyone has a clue about a)?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message