[Java lista] resource location

Avramucz István avramucz at gmail.com
2009. Júl. 14., K, 17:06:12 CEST


Hello javalist,

Spring + Velocity használata során a következő kivételt kapom: "...
nested exception is
org.apache.velocity.exception.ResourceNotFoundException: Unable to find
resource 'mytemplate.vm'"

A web.xml tartalmazza a következő bejegyzést:
<init-param>
    <param-name>properties</param-name>
    <param-value>/WEB-INF/velocity.properties</param-value>
</init-param>

A velocity.properties így néz ki:
resource.loader = webapp
webapp.resource.loader.class =
org.apache.velocity.tools.view.servlet.WebappLoader
webapp.resource.loader.path = /WEB-INF/vTemplates/
webapp.resource.loader.cache = false
webapp.resource.loader.modificationCheckInterval = 2

A
VelocityEngineUtils.mergeTemplateIntoString(velocityEngine,"mytemplate.vm",
data) hívás hatására kapom a fenti exception-t.

A JavaDoc szerint a mytemplate.vm "relative to Velocity's resource
loader path".

Kérdésem, hogy pontosan hol is helyezzem el a mytemplate.vm-et?

Köszönöm.
AI



További információk a(z) Javalist levelezőlistáról