A phone number really isn't a number, it is a String containing digits. The fmt:formatNumber tag uses the DecimalFormat class to generate the output, and there just is no way to convert a number or String into a phone number format using the DecimalFormat class.
For the code you presented here will assume the parenthesis means positive numbers and the dash will format negative numbers. Your output would be (2145255656)--. That is, if you get past the parse errors.
The parse error comes from an incompatible input value, possibly because the value in the variable contains quotes, or is not a Number, or can't be coerced into a Number.
The solution is to format the phone number as a String with the proper format in the data object before you try to receive it in the
JSP. An example utility method for doing so might be:
Which is set up for US, local 10 digit phone calls in the form (123) 456-7890.
[ August 08, 2008: Message edited by: Steve Luke ]
[ August 08, 2008: Message edited by: Steve Luke ]