velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nathan Bubna <>
Subject Re: tools 1.4=>2.0 upgrade, configuration question
Date Wed, 25 Feb 2009 19:37:30 GMT
On Wed, Feb 25, 2009 at 11:25 AM, rhild <> wrote:
> I was using beta 2.  I just updated to beta 3 and all is well now. I don't
> know why I didn't notice sooner I was one version behind.
> While I have your attention a few more questions.  I see that beta 3
> includes velocity 1.5.  Is there any reason to think the beta 3 would have
> any problems with the latest 1.6.1?

None at all.  It should work great with 1.6.

> Since I am already extending VelocityViewServlet it would be cleaner to
> override int() there to configure the engine rather than extend
> VelocityView, if it will work the way I want. I want to
> be used and then add to or modify from there. If I understand the code you
> gave overriding init() it is throwing out the original config and starting
> from scratch, which is not what I want.  Am I understanding that code
> correctly? If so, is there an easy way to modify the config versus starting
> from scratch in init().  If the answer is no, that's OK.  What I have now
> works.

The answer is no; if you drop a new VelocityEngine into the
VelocityView, then all configuration done on the previous engine is
for naught.  This is why i recommend having your own VelocityView
subclass.    However, if you really prefer to just have the
VelocityViewServlet subclass, it's not terribly complicated to
duplicate that effort yourself.  You can copy the code that does it
out of the VelocityView class.  This is open source, after all. :)

> thanks,
> -Ray
> Nathan Bubna wrote:
>> Odd. Which VelocityViewServlet does your VelocityServlet extend?  It
>> should be extending
>> Also, which version of VelocityTools 2 are you using?
> --
> View this message in context:
> Sent from the Velocity - User mailing list archive at
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

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

View raw message