velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Hooke" <ke...@kevinhooke.com>
Subject ResourceNotFoundException trying to use FileResouceLoader
Date Wed, 19 Mar 2003 20:15:16 GMT
Hi - I am calling the Velocity engine as a singleton in a class used by a
servlet on tomcat 4.1.

My templates are currently being loaded from tomcat4.1/bin.

Following other suggestions in the archive of this mail list I have set the
following properties to init the engine to use the file resource loader, and
set the base directory:

Velocity.init();
Velocity.setProperty(Velocity.FILE_RESOURCE_LOADER_PATH, _outputDir);
Velocity.setProperty(Velocity.RESOURCE_LOADER, "file");

where _output dir is "f:/somedir"

The engine is still loading the template from tomcat4.1/bin, despite the
above settings. Am I on the right track here or are there some other
settings I need to set to get Velocity to load from the dir I want?

I notice in the velocity.log (also in tomcat4.1/bin) that it is reading the
default velocity.properties file from the velocity jar. Should I set up my
own properties file, or is it ok to set these properties programatically?

Thanks,

Kevin Hooke
MindBeans Software Consulting
http://www.mindbeans.net



---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Mime
View raw message