struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bill Siggelkow <bills...@bellsouth.net>
Subject Re: bean:write throws "Wrong format string"
Date Tue, 06 Jul 2004 19:19:05 GMT
You might want to look into the JSTL formatting tags. They handle 
locales quite well.

James A. Hillyerd wrote:

> I'm having a problem rendering a number using the bean write tag, I'm 
> using Struts 1.1.
> 
> This is the offending JSP code:
> 
> <bean:write name="l" property="lp" formatKey="format.integer"/>
> 
> Here is the format entry in my appliation.resources:
> 
> format.integer=###,###,###,##0
> 
> This is the exception that gets logged:
> 
> 2004-07-05 12:21:34 StandardWrapperValve[default]: Servlet.service() for 
> servlet default threw exception
> javax.servlet.jsp.JspException: Wrong format string: '###,###,###,##0'
>         at 
> org.apache.struts.taglib.bean.WriteTag.formatValue(WriteTag.java:376)
>         at 
> org.apache.struts.taglib.bean.WriteTag.doStartTag(WriteTag.java:292)
> 
> The strange part is that this particular JSP page always works for me, 
> but I still see a large number of exceptions in my logfile.  When I 
> compare the time of the exception to my access log, I see that the 
> people that trigger the exception are coming from other locales (such as 
> China).
> 
> My application is not localized, and since it's a site that lists US 
> homes for sale, I don't plan to make alternate language versions anytime 
> soon!
> 
> How can I fix this?
> 
> Thanks!
> 
> -james
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message