Thanks for reply ,David,
Before writing my code I refered that page.
They mentioed there as
Some VM tags require an #end statement while others do not. The inconsistency arises from a limitation in Velocity where tags must declare if they are a block or inline tag up front. As such, by default all tags are inline except for a few key ones, such as the form tag.
So obviouly I need #end tag ,and I also tried without that, then the tags were just ignored and printed as it is.