http://cwiki.apache.org/confluence/display/WW/text will do what you need. Take look at the example with resource property "format.money" and note the link to http://java.sun.com/j2se/1.4.2/docs/api/java/text/MessageFormat.html which has the info you need to build a format pattern. You could also do the same thing with JSTL if you prefer: http://java.sun.com/products/jsp/jstl/1.1/docs/tlddocs/fmt/tld-summary.html
Josh On 8/29/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hi, > > I need help in formatting a String, when it is displayed. > > Here is what i am doing: > > <bean:write name="someObject" property="exampleSSN"/> > > It is stored asa continous unformatted String an hence displayed as > 'XXXXXXXXX'. Now, I want my social security number to be displayed as > (XXX) - XX - XXXX. > > How can i acheive this in Struts, without actually using my own custom Tag > libraries which do this formatting for me. If somebody can throw some > pointers, it woould help the cause. > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]