Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ssis/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Parsing 解析velocity中的整数时出现NumberFormatException_Parsing_Velocity - Fatal编程技术网

Parsing 解析velocity中的整数时出现NumberFormatException

Parsing 解析velocity中的整数时出现NumberFormatException,parsing,velocity,Parsing,Velocity,/$colspan是字符串中的数字(例如$colspan=“5”)。解析时,有时它会给出NumberFormatException。任何帮助都将不胜感激 #set($Integer=0) #if($Integer.parseInt($colspan)>1) //some code here..... #end 为什么不使用VelocityTools项目中的MathTool或NumberTool呢。有没有人能给我举一个用MathTool或NumberTool?context

/$colspan
是字符串中的数字(例如
$colspan=“5”
)。解析时,有时它会给出NumberFormatException。任何帮助都将不胜感激

#set($Integer=0)       
#if($Integer.parseInt($colspan)>1)
 //some code here.....
#end

为什么不使用VelocityTools项目中的MathTool或NumberTool呢。

有没有人能给我举一个用MathTool或NumberTool?context.put(“math”,new MathTool())解析整数的例子#如果($math.toInteger($colspan)>1)