You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Anagha <an...@gmail.com> on 2006/02/09 08:26:39 UTC

Concatenating String in VTL

Hi,
Trying out following in the VTL :

#set($finalService=$serviceName+"Service")
$finalService

where $serviceName has some string in it.
The output is
$finalService

Is there any other way to concat string in VTL?
Any help is welcome.
--
Thanks & Regards,
Anagha

Re: Concatenating String in VTL

Posted by Manish <pr...@gmx.net>.
Simply do this - 
#set($finalService="${serviceName}Service")

- Manish


----- Original Message ----- 
From: "Anagha" <an...@gmail.com>
To: "velocity-user" <ve...@jakarta.apache.org>
Sent: Thursday, February 09, 2006 12:56 PM
Subject: Concatenating String in VTL


Hi,
Trying out following in the VTL :

#set($finalService=$serviceName+"Service")
$finalService

where $serviceName has some string in it.
The output is
$finalService

Is there any other way to concat string in VTL?
Any help is welcome.
--
Thanks & Regards,
Anagha



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


Re: Concatenating String in VTL

Posted by Manish <pr...@gmx.net>.
This should be useful for you if you have just started with velocity -- as it 
seems from your posts in the list
http://jakarta.apache.org/velocity/docs/user-guide.html

HTH,
- manish

----- Original Message ----- 
From: "Anagha" <an...@gmail.com>
To: "velocity-user" <ve...@jakarta.apache.org>
Sent: Thursday, February 09, 2006 12:56 PM
Subject: Concatenating String in VTL


Hi,
Trying out following in the VTL :

#set($finalService=$serviceName+"Service")
$finalService

where $serviceName has some string in it.
The output is
$finalService

Is there any other way to concat string in VTL?
Any help is welcome.
--
Thanks & Regards,
Anagha



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