tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rashmi Rubdi <dev_subscripti...@yahoo.com>
Subject Re: Need info on: JspException: In <parseNumber>, a parse locale can not be established
Date Fri, 22 Sep 2006 20:44:03 GMT
I was able to solve this problem. 

I had to set 
<fmt:setLocale value="en-US"/>
and set the parseLocale attribute of fmt:parseNumber
to "en-US"

I was only getting this error in Tomcat's
localhost2006-09-21.log when a User Agent from Germany
was accessing the page which had fmt:parseNumber on
it. 

The JSTL spec says that if a locale is not specified
then it defaults to the browser's locale. 

That must have caused this error.

--- Rashmi Rubdi <dev_subscriptions@yahoo.com> wrote:

> I couldn't find any information on this error: 
> 
> javax.servlet.jsp.JspException: 
> In <parseNumber>, a parse locale can not be
> established
> 
> I only see this error in the server logs and it does
> not prevent the JSP page from executing and
> displaying
> itself.
> 
> I think this error was caused by this line of code
> in
> my JSP:
> 
> <fmt:parseNumber var="quotient"
> value="${item_position
> div 10}" type="number" integerOnly="true" />
> 
> In the above code i'm trying to divide item_position
> by 10 and trying to get only the integer portion of
> the result. (Not performing any i8n)
> 
> In short, I'm trying to integer truncate the
> quotient.
> 
> 
> Am I supposed to set the locale before using
> fmt:parseNumber? 
> 
> Although this page displays correctly, I'm having
> problems while crawling/spidering the page and wish
> to
> eliminate all errors to ensure that the page is
> crawled properly.
> 
> Please help.
> 
> -Rashmi
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> http://mail.yahoo.com 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> taglibs-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> taglibs-user-help@jakarta.apache.org
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


Mime
View raw message