You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by Rashmi Rubdi <de...@yahoo.com> on 2006/09/22 00:56:25 UTC

Need info on: JspException: In , a parse locale can not be established

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


Re: Need info on: JspException: In , a parse locale can not be established

Posted by Rashmi Rubdi <de...@yahoo.com>.
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 <de...@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