You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by "George, Nixon" <Ge...@sutterhealth.org> on 2009/12/09 22:50:22 UTC

Cannot find template in #parse

I am working on a web project that has a velocity template that uses a parse statement to include a sub-template BUT it is not able to find the sub-template.:

#parse( "eventmain.vm" )


My velocity.properties file is configured with two resource loaders:

resource.loader = url, webapp
url.resource.loader.class = org.apache.velocity.runtime.resource.loader.URLResourceLoader
url.resource.loader.cache = false
webapp.resource.loader.description = Velocity File Resource Loader
webapp.resource.loader.class = org.apache.velocity.tools.view.servlet.WebappLoader
webapp.resource.loader.path = /template
webapp.resource.loader.cache = false

Where do I need to place the sub-template eventmain.vm? The documentation says TEMPLATE_ROOT but what is that in my case?

Thanks,
george



Re: Cannot find template in #parse

Posted by Nathan Bubna <nb...@gmail.com>.
2009/12/9 George, Nixon <Ge...@sutterhealth.org>:
> I am working on a web project that has a velocity template that uses a parse statement to include a sub-template BUT it is not able to find the sub-template.:
>
> #parse( "eventmain.vm" )
>
>
> My velocity.properties file is configured with two resource loaders:
>
> resource.loader = url, webapp
> url.resource.loader.class = org.apache.velocity.runtime.resource.loader.URLResourceLoader
> url.resource.loader.cache = false
> webapp.resource.loader.description = Velocity File Resource Loader
> webapp.resource.loader.class = org.apache.velocity.tools.view.servlet.WebappLoader
> webapp.resource.loader.path = /template
> webapp.resource.loader.cache = false
>
> Where do I need to place the sub-template eventmain.vm? The documentation says TEMPLATE_ROOT but what is that in my case?

That would be your webapp.resource.loader.path property and the
conspicuously absent  url.resource.loader.root property.


> Thanks,
> george
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
For additional commands, e-mail: user-help@velocity.apache.org