Correct documentation of Configuring Resource Loaders
-----------------------------------------------------

                 Key: VELOCITY-780
                 URL: https://issues.apache.org/jira/browse/VELOCITY-780
             Project: Velocity
          Issue Type: Task
          Components: Documentation
    Affects Versions: 1.6.4
            Reporter: Rafał Miłecki


I spent whole day fighting with my first "hello world" 
VelocityViewServlet-based servlet. I was struggling with:
org.apache.velocity.exception.ResourceNotFoundException

For following dumb code:
protected Template getTemplate(HttpServletRequest request, HttpServletResponse 
response) {
        return getTemplate("test.vm");
}

1) 
http://velocity.apache.org/engine/releases/velocity-1.6.4/developer-guide.html#Velocity_Configuration_Keys_and_Values
claims following:
resource.loader = <name> (default = file)

As the result I was trying to use following configuration:
file.resource.loader.path = WEB-INF/vmtemplates

2) 
http://velocity.apache.org/engine/releases/velocity-1.6.4/developer-guide.html#Configuring%5FResource%5FLoaders
doesn't mention "webapp" (which seems to be default btw)


The correct solution for me was to change
file.resource.loader.path = WEB-INF/vmtemplates
to
webapp.resource.loader.path = WEB-INF/vmtemplates


I don't know Velocity enough yet, so can not really write correct docs. Would 
be great if someone could clear this part.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to