velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kadve, Ketaki Sheshrao" <>
Subject How to escape double quote(")
Date Tue, 30 Oct 2007 10:58:47 GMT

We are trying to use #set to write some Java code.

We want to do something like this:


#set ($var = "field.equals ( "abcdbbbbb" ) ");


And then we want to use $var in if statement as follows:


if ($var)

   cnt = 0;


The problem is Velocity does not allow to use double quotes ( " ) inside
String defined in #set. Escape characters are also not working.

So we get error at second double quote (in Green), suggesting that it
should be the end of String defined for $var.

#set ($var = "field.equals ( "abcdbbbbb" ) ");



Thanks in advance.

This email and any files transmitted with it are confidential, proprietary
and intended solely for the individual or entity to whom they are addressed.
If you have received this email in error please delete it immediately.

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