Return-Path: Delivered-To: apmail-jakarta-velocity-dev-archive@jakarta.apache.org Received: (qmail 64960 invoked by uid 500); 10 Sep 2001 19:40:35 -0000 Mailing-List: contact velocity-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Reply-To: velocity-dev@jakarta.apache.org Delivered-To: mailing list velocity-dev@jakarta.apache.org Received: (qmail 64943 invoked from network); 10 Sep 2001 19:40:35 -0000 Message-ID: From: "Provencher, Samuel" To: "'velocity-dev@jakarta.apache.org'" Subject: RE: Newbee problems Date: Mon, 10 Sep 2001 15:45:21 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 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: ex.=20 Given this directory structure...=20 D:\ | |- mytemplate.vm |- myDirectory | |- mySubDirTemplate.vm Initializing the engine to "d:/", then allows you to merge the = following templates. "mytemplate.vm" "myDirectory/mySubDirTemplate.vm" 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 [mailto:JSoriano@es.wanadoo.com] Sent: Monday, September 10, 2001 8:12 AM To: velocity-dev@jakarta.apache.org 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=20 (.../tomcat/webapps/myapplication/paises.vm) and i'm trying to merge it from my java code using a line like this: Velocity.mergeTemplate("paises.vm",ctx,somethingHTML); Where is Velocity trying to find the vm file? Is this an absolute path? is it configurable? Thanks in advance, regards: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D Jaume Soriano Sivera Tel: 965040000 -ext. 44744 Fax: 965040047 Redes y Sistemas / Portal - NNTT=20 Wanadoo Espa=F1a - http://www.wanadoo.es =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D