On 7/19/07, Erron Austin <[EMAIL PROTECTED]> wrote:
In my webapp I'm initializing Velocity the like this:
   Velocity.*init*(props);

However, later in my code I'm trying to update this properties like so:

if(condition){

Velocity.*clearProperty*("file.resource.loader.path");

Velocity.*addProperty*("file.resource.loader.path", prefs.getContentPath());

Velocity.*clearProperty*("resource.loader");

Velocity.*addProperty*("resource.loader", "file");

else{

Velocity.*clearProperty*("url.resource.loader.root");

Velocity.*addProperty*("url.resource.loader.root", prefs.getContentPath());

Velocity.*clearProperty*("resource.loader");

Velocity.*addProperty*("resource.loader", "url");

}

I've also tried to use setProperty instead.  I was hoping to avoid using
multiple instances of the Velocity Engine as initial testing shows it is
much slower than the singleton model.

Is it not possible to dynamically update the values of the singleton?

nope, sorry.  once the runtime (either the singleton or an engine) has
been initialized, the properties can't be updated.

Thanks,

Erron


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

Reply via email to