velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Barbara Baughman <baugh...@utdallas.edu>
Subject Re: String concatenation
Date Mon, 06 Oct 2003 19:12:22 GMT
try
 #set($idImagen = $id)
 #set($idImagenBlank = "${id}_blank")
 #set($idImagenSrc = "${id}.src")
 #set($idImagenBlankSrc = "${id}_blank.src")
 #set($idImagenSrcValue = "$res_buttonPath$keyValue")


Barbara Baughman
X2157

On Mon, 6 Oct 2003, Guillermo Meyer wrote:

> I have a Velocity template that recives the following parameters:
>
> id
> keyValue
> res_buttomPath
>
> I want to concatenate some strings to be used in my template:
>
> #set($idImagen = $id)
> #set($idImagenBlank = $id"_blank")
> #set($idImagenSrc = $id".src")
> #set($idImagenBlankSrc = $id"_blank.src")
> #set($idImagenSrcValue = $res_buttonPath$keyValue)
>
> But I get the following error:
>
> org.apache.velocity.exception.ParseErrorException: Encountered "\"_blank\""
> at line 2, column 26.
> Was expecting one of:
> <RPAREN> ...
> <WHITESPACE> ...
> "-" ...
> "+" ...
> "*" ...
> "/" ...
> "%" ...
> "&&" ...
> "||" ...
> "<" ...
> "<=" ...
> ">" ...
> ">=" ...
> "==" ...
> "!=" ...
> <DOT> ...
> "=" ...
>
> What am I doing wrong? How do I concatenate 2 Strings?
>
> thanks in advance.
> Guillermo.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Mime
View raw message