velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nathan Bubna <nat...@esha.com>
Subject Re: Template not found
Date Thu, 23 Sep 2004 14:58:19 GMT
Manish said:
> I have a class that uses velocity template. I specify its path with
> property - "file.resource.loader.path"
> When class is called from stand-alone application, there is no problem
> getting the template, however when this class is used from a servlet it
> fails with following exception -
>
> com.circus.core.Application$1:Unable to find resource
> 'updated_properties.vm'
> org.apache.velocity.exception.ResourceNotFoundException: Unable to find
> resource 'updated_properties.vm'
...
> at org.apache.velocity.app.Velocity.getTemplate(Velocity.java:469)
...
> The path is pseciied through properly, and in all cases it is corrctly
> specified. I have printed this path and it shows (absolute value) -
> Velocity template path - /home/theproject/templates/velocity
>
> The resource loader is -
> Resource Loader Instantiated:
> org.apache.velocity.tools.view.servlet.WebappLoader

then i'm betting the path property should be 'webapp.resource.loader.path' for
this.  but i can't say for sure without knowing how Velocity was initialized.
can you show us more of the velocity.properties being used?

> Thouh I don't know where thsi resource loader is getting specified. (This
> code is wriitten by someone else). But for the unit test of my class, the
> resource loader is -
>
> [info] Resource Loader Instantiated:
> org.apache.velocity.runtime.resource.loader.FileResourceLoader
>
> Which works properly. What can I do to make thsi work?????
...

Nathan Bubna
nathan@esha.com


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


Mime
View raw message