what version of VelocityTools are you using?  and are you trying to
initialize the Velocity singleton within the same application as the
VelocityViewServlet?

have you tried initializing a VelocityEngine instead of the singleton?

On 6/27/05, Leo Asanov <[EMAIL PROTECTED]> wrote:
> Hi!
> 
> What is the right way to initialize Velocity outside
> of a servlet? My application works fine when I'm using
> VelocityViewServlet, but when I'm trying to initialize
> Velocity from any standard Java class (with
> Velocity.init(absolutePathToPropertiesFile))
> Velocity.mergeTemplate always throws
> "ResourceNotFound" exception.
> 
> I guess this happens because Velocity cannot get
> parent directory of a web application without a
> reference to servlet context. But I'm not sure what I
> can do with this. I can't specify absolute path in
> velocity.properties and I would prefer to avoid
> setting path properties directly in the code (I don't
> know how to it anyway - tried
> Velocity.setProperty("file.resource.loader.path",absolutePathToTemplateDirectory)
> and it didn't work).
> Maybe it's possible to pass a "default directory" path
> somehow?
> 
> Cheers,
> Leo Asanov
> 
> 
> 
> ____________________________________________________
> Yahoo! Sports
> Rekindle the Rivalries. Sign up for Fantasy Football
> http://football.fantasysports.yahoo.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to