velocity-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Provencher, Samuel" <>
Subject RE: Newbee problems
Date Mon, 10 Sep 2001 19:45:21 GMT
This is a common error for people new to Velocity. You are required to set a
root that Velocity will initialize the engine with. Every other template you
target, must be in that directory or a subdirectory. You can then define the
files and subdirectories as part of the target file as such:

	Given this directory structure... 
 |- mytemplate.vm
 |- myDirectory
         |- mySubDirTemplate.vm

Initializing the engine to "d:/", then allows you to merge the following


NOTE: While switching drive letters is currently not supported for target
files, on
UNIX systems, this is probably not much of an issue.

-----Original Message-----
From: Soriano, Jaume []
Sent: Monday, September 10, 2001 8:12 AM
Subject: Newbee problems

Hi! i'm writing a new application using Velocity as
my template engine but i'm having the following problem.

When i try to execute my application i get:

org.apache.velocity.exception.ResourceNotFoundException: Unable to find
resource 'paises.vm'

My 'vm' file is located at root level in the context 
and i'm trying to merge it from my java code using a line
like this:


Where is Velocity trying to find the vm file?
Is this an absolute path? is it configurable?

Thanks in advance, regards:

Jaume Soriano Sivera
Tel: 965040000 -ext. 44744 Fax: 965040047
Redes y Sistemas / Portal - NNTT 
Wanadoo EspaƱa -

View raw message