velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Carter <>
Subject Debugging templates that have #include or #parse
Date Fri, 29 Apr 2011 15:08:09 GMT

Hi all,

I have this problem on rare occasions, but I've never found a way
to resolve it...

Say I have a template named "template.vm" that has something like:

<title>Page Name</title>
#parse ( "macros.vm" )
#parse ( "" )

#set ( $foo = "some val")

I'll find some velocity error in the logs, like:

Velocity [error] Error in evaluation of == expression. Both arguments
must be of the same Class. Currently left = class java.lang.String,
right = class java.lang.Long. /template.vm [line 10, column 42]

The error is indicating line 10 in the /template.vm file, but the error
is actually in one of the #parsed files, so locating the error can be
difficult at times.

Is there a way to expand the template so that it shows all of the velocity
code un-parsed? As I recall long ago, C had a way to show the contents of
a .c file that would expand macros and show the contents of include files.



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message