[
https://issues.apache.org/jira/browse/VELOCITY-780?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claude Brisson resolved VELOCITY-780.
-------------------------------------
Resolution: Fixed
Assignee: Claude Brisson
Fix Version/s: 2.x
Documentation fixed with commit 1760191.
> Improve Configuring Resource Loaders docs by mentioning difference for VVS
> --------------------------------------------------------------------------
>
> Key: VELOCITY-780
> URL: https://issues.apache.org/jira/browse/VELOCITY-780
> Project: Velocity
> Issue Type: Improvement
> Components: Documentation
> Affects Versions: 1.6.4
> Reporter: Rafał Miłecki
> Assignee: Claude Brisson
> Priority: Minor
> Fix For: 2.x
>
>
> 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 was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]