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?

Thanks,

Erron

Reply via email to