VelocityConfigurer vc = new VelocityConfigurer();
vc.setResourceLoaderPath("file:/mydir,file:/yourdir");
vc.setResourceLoader(new ResourceLoader() {
public Resource getResource(String location) {
if ("file:/yourdir/test".equals(location)) {
return new DescriptiveResource("");
}
return new ByteArrayResource("test".getBytes(), "test");
}
public ClassLoader getClassLoader() {
return getClass().getClassLoader();