the simplest way is to do either:
context.put("Q", "\"");
or
#set( $Q = '"' )
and then do:
#set( $var = "field.equals(${Q}abcdbbbbb${Q});" )
On 10/30/07, Kadve, Ketaki Sheshrao <[EMAIL PROTECTED]> wrote:
> Hi,
>
> 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.
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]