tags:

views:

23

answers:

2

Hello,

I'm trying to create a webApp using GlashFish server and Velocity.

But i get the following error:

    SEVERE: ResourceManager : unable to find resource 'temp.vm' in any resource loader.
SEVERE: org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource 'temp.vm'

velocity.proprieties:

resource.loader=webapp
webapp.resource.loader.class=org.apache.velocity.tools.view.WebappResourceLoader
webapp.resource.loader.path=/WEB-INF/templates/

Servlet:

 ve.setApplicationAttribute("javax.servlet.ServletContext", context);
            template = ve.getTemplate("temp.vm");

I am using NetBeans IDE and my temp.vm file is in /WEB-INF/templates/. The must be somethings I'm missing but I just can't get what it is.

Thank you for your help!