One option is to write a Java class for checking template existence and put it in Velocity context as a tool.
#if( $templateTool.exists("hello.inc") ) #parse("hello.inc") #end bluejoe-2 wrote: > > how to determine the included template file exists or not? in my .vm > page, i want to write such codes as follows: > > #set($var=$param("fileName")) > #parse("${var}.inc") > -- View this message in context: http://old.nabble.com/how-to-determine-the-included-template-file-exists-or-not--tp28354538p28354663.html Sent from the Velocity - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@velocity.apache.org For additional commands, e-mail: user-h...@velocity.apache.org