You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Daniel Stolz <da...@future-skies.com> on 2002/11/14 15:25:22 UTC

Escaping dollar leaves backslash

I'm trying to output '$TTL'.  I put '\$TTL' in the template.  '\$TTL'
gets output.  If I remove the \, the output is '$TTL', but an error is
generated in velocity.log.  Is there any way I can output '$TTL' with no
errors?

Daniel Stolz - Future Skies
C: 732-713-8348 O: 732-427-3345



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Escaping dollar leaves backslash

Posted by Kent Johnson <ke...@skillsoft.com>.
This looks like a bug. A workaround is to put the $ in a variable. If 
a template contains:

\$test
\$TEST
#set ($dollar = "$")
${dollar}TEST

the output is
$test
\$TEST
$TEST

I am also using Velocity 1.3.1-rc2
Running Java 1.4.0_01 on Windows 2000

Kent

>
>-----Original Message-----
>From: Denis [mailto:jido@respublica.fr]
>Sent: Thursday, November 14, 2002 9:32 AM
>To: Velocity Users List
>Subject: Re: Escaping dollar leaves backslash
>
>
>\$TTL is correct. Which version of Velocity?
>
>-- Denis.
>
>On Thursday, November 14, 2002, at 02:25  pm, Daniel Stolz wrote:
>
>>  I'm trying to output '$TTL'.  I put '\$TTL' in the template.  '\$TTL'
>>  gets output.  If I remove the \, the output is '$TTL', but an error is
>
>>  generated in velocity.log.  Is there any way I can output '$TTL' with
>>  no errors?
>>
>>  Daniel Stolz - Future Skies
>>  C: 732-713-8348 O: 732-427-3345
>>
>
>
>
>--
>To unsubscribe, e-mail: 
><ma...@jakarta.apache.org>
>For additional commands, e-mail: 
><ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Escaping dollar leaves backslash

Posted by Daniel Stolz <da...@future-skies.com>.
Velocity 1.3.1-rc2
Running Java 1.4.0_01 on Windows 2000

-----Original Message-----
From: Denis [mailto:jido@respublica.fr] 
Sent: Thursday, November 14, 2002 9:32 AM
To: Velocity Users List
Subject: Re: Escaping dollar leaves backslash


\$TTL is correct. Which version of Velocity?

-- Denis.

On Thursday, November 14, 2002, at 02:25  pm, Daniel Stolz wrote:

> I'm trying to output '$TTL'.  I put '\$TTL' in the template.  '\$TTL' 
> gets output.  If I remove the \, the output is '$TTL', but an error is

> generated in velocity.log.  Is there any way I can output '$TTL' with 
> no errors?
>
> Daniel Stolz - Future Skies
> C: 732-713-8348 O: 732-427-3345
>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Escaping dollar leaves backslash

Posted by Denis <ji...@respublica.fr>.
\$TTL is correct. Which version of Velocity?

-- Denis.

On Thursday, November 14, 2002, at 02:25  pm, Daniel Stolz wrote:

> I'm trying to output '$TTL'.  I put '\$TTL' in the template.  '\$TTL'
> gets output.  If I remove the \, the output is '$TTL', but an error is
> generated in velocity.log.  Is there any way I can output '$TTL' 
> with no
> errors?
>
> Daniel Stolz - Future Skies
> C: 732-713-8348 O: 732-427-3345
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>