velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "carlo latasa" <>
Subject Re: VelocityEngine...
Date Thu, 04 Dec 2008 19:44:44 GMT
Thanks both of you for the quick response.

So I'm not creating a static instance of the VelocityEngine in my Directive
base class and calling init in a static initalizer.

Now when getTemplate is called on the velocityEngine instance I get:

org.apache.velocity.exception.ResourceNotFoundException: Unable to find
resource '/templates/dashheader.vm'

There's a setting in either or that
tells the engine where to look. What is that setting?

I'm assuming that calling init() on the engine with no params will default
to using the file in my WEB-INF/classes dir.

Thanks again.

On Thu, Dec 4, 2008 at 9:19 AM, carlo latasa <> wrote:

> So in the webwork 1.x code I have, there's a subclass of the velocity
> runtime Directive class that has some code like the following:
>     protected VelocityEngine velocityEngine =
> VelocityManager.getInstance().getVelocityEngine();
>     Template template = velocityEngine.getTemplate(templateName);

Carlo Latasa
Cell: (415) 385-1567

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message