Hi,

Thanks for your answer. I tried to use class loader and i spent a litle
time this problem again. I'm happy because I found the solution of
ResourceNotFoundException.
I have to use resource.loader and class.resource.loader.class properties
and the path of my *.html file need begin with "WEB-INF/classes/".

Here is part of my good code:


String packageName = this.getClass().getCanonicalName()

Properties p = new Properties();
p.setProperty("resource.loader", "class");
p.setProperty("class.resource.loader.class",
"org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader");

VelocityEngine engine = new VelocityEngine();
engine.init(p);
Template template = engine.getTemplate("WEB-INF/classes/" +
packageName.replaceAll("\\.", "/") + ".html");


THX.



-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Ezen uzenet es annak barmely csatolt anyaga bizalmas, jogi vedelem alatt all, a 
nyilvanos kozlestol vedett.
Az uzenetet kizarolag a cimzett, illetve az altala meghatalmazottak 
hasznalhatjak fel. Ha On nem az uzenet cimzettje, 
ugy kerjuk, hogy telefonon, vagy e-mail-ben ertesitse errol az uzenet kuldojet 
es torolje az uzenetet, 
valamint annak osszes csatolt mellekletet a rendszerebol. Ha On nem az uzenet 
cimzettje, abban az esetben tilos az 
uzenetet vagy annak barmely csatolt mellekletet lemasolnia, elmentenie, az 
uzenet tartalmat barkivel kozolnie 
vagy azzal visszaelnie.


This message and any attachment are confidential and are legally privileged. It 
is intended solely for the use of 
the individual or entity to whom it is addressed and others authorised to 
receive it. If you are not the intended 
recipient, please telephone or email the sender and delete this message and any 
attachment from your system. 
Please note that any dissemination, distribution, copying or use of or reliance 
upon the information contained in 
and transmitted with this e-mail by or to anyone other than the recipient 
designated above by the sender is 
unauthorised and strictly prohibited.


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

Reply via email to