velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "vadivu sushma subbiah" <>
Subject Placing templates and accessing it
Date Fri, 21 Jul 2006 13:27:11 GMT

I have 5 velocity templates files in webapp path (for eg. com/abc/cd/)
depending upon the condition, i need to select a template.

if i place the templates in my machine specific path (for eg. d:/oc4j/j2ee/home), i am able
to get the template depending on the condition using the following syntax..

final String CONFIG_DIR = "D:\\oc4j\\j2ee\\home\\";             
Velocity.setProperty( Velocity.FILE_RESOURCE_LOADER_PATH,CONFIG_DIR );

if i place the templates in webapp path, i am unable to access the template files..
it is saying "unable to find resource"

may i know the webapp location to place the templates and syntax to access those template(.vm)



  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message