velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathan Bubna" <nbu...@gmail.com>
Subject Re: template in a Tapestry 5 app
Date Tue, 15 Jan 2008 15:24:51 GMT
The FileResourceLoader is very difficult to use in a webapp.  We
recommend that you use the WebappResourceLoader (aka WebappLoader)
that is provided by the VelocityTools library instead.

If you really want to use the FileResourceLoader, then the problem is
likely that you need to use an absolute path as the value for
file.resource.loader.path, instead of a relative path.

Also consider reading:
http://velocity.apache.org/engine/releases/velocity-1.5/webapps.html

On Jan 15, 2008 12:30 AM, AngeloChen960 <angelochen960@gmail.com> wrote:
>
> Hi,
>
> how Velocity locates template file in a web app? here is what I did:
>
> in the WEB-INF i have a velocity.properties with following content:
> resource.loader = file
> file.resource.loader.path = /tmp
>
> and I put a .vm file in /tmp
>
> in the code, I did:
>   Template t = ve.getTemplate("registrationEmail.vm");
>
> but always got the exception:ResourceNotFoundException
>
> why?
>
> Thanks
>
>
> --
> View this message in context: http://www.nabble.com/template-in-a-Tapestry-5-app-tp14833725p14833725.html
> Sent from the Velocity - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
> For additional commands, e-mail: user-help@velocity.apache.org
>
>

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


Mime
View raw message