velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan1987 <>
Subject Eclipse-Plugin + Velocity + read Files
Date Wed, 25 Feb 2009 11:10:07 GMT


i´m working with your velocity engine and i have got the following problem:

In my root-plugin-folder are the two files and

At first there were problems reading the "", but i solved
it that way:

URL url =
Velocity.init(FileLocator.toFileURL(url).getPath() );

Now i wanted to transfer this solution to the template problem:

url=Activator.getDefault().getBundle().getResource (pTemplatePath);
Template lTemplate = Velocity.getTemplate(FileLocator.toFileURL(url).ge

pTemplatePath is a String, for example "Templates\\TableTemplate.tpl";

I wanted to check, if the FileLocator works, so i put a


in my code! It works correctly. But in the end there is still a


I would appreciate any help. Thank you!
Best Regards
View this message in context:
Sent from the Velocity - User mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message