velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shinobu Kawai <shinobu.ka...@gmail.com>
Subject Re: Protecting character in velocity
Date Tue, 14 Sep 2004 21:55:59 GMT
Hi emmanuel,

> is it possible to do this with velocity, if I code this :
> 
> # set (${name} = ${name}.replaceAll('\.', '_'))
> 
> I have this exception :
> 
> java.lang.NullPointerException
>        com.opensymphony.webwork.views.jsp.ui.AbstractUITag.mergeTemplate(AbstractUITag.java:310)

> BTW: this is a webwork template written with velocity
I don't know anything about webwork, but the code above doesn't work
in my Velocity environment, either.  Try removing the curly brackets.
i.e.
   #set ($name = $name.replaceAll('\.', '_'))
or if you must,
   #set ($name = ${name.replaceAll('\.', '_')})

Best regards,
-- Shinobu Kawai

-- 
Shinobu Kawai(shinobu.kawai@gmail.com)

---------------------------------------------------------------------
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