[prev in list] [next in list] [prev in thread] [next in thread]
List: taglibs-user
Subject: RE: Error with taglib parseDate
From: "T. Lamine Ba" <lamine75 () hotmail ! com>
Date: 2007-08-07 14:34:42
Message-ID: 003301c7d900$17dd6080$650fa8c0 () TBALaptop
[Download RAW message or body]
Thx much for the tip Kris.
Lamine.
-----Original Message-----
From: Kris Schneider [mailto:kris@directthought.com]
Sent: Tuesday, August 07, 2007 9:14 AM
To: Tag Libraries Users List
Subject: Re: Error with taglib parseDate
On 8/6/07, T. Lamine Ba <lamine75@hotmail.com> wrote:
> Hi all,
>
> I use <parseDate> in webapp "www.buildtrees.com" as follows:
>
> ***
> <fmt:parseDate var="birthdate" value="${param.birthdate}"
> pattern="MMM-dd-yyyy" />
> ***
>
> It works great when I visit the site with my computers. On the other
> hand, some of my web visitors produce the error below:
>
> ***
> Exception: javax.servlet.jsp.JspException: In <parseDate>, value
> attribute can not be parsed: "OCT-02-2002"
>
> Error message: In <parseDate>, value attribute can not be parsed:
> "OCT-02-2002"
> ***
>
> I suspect the problem is browser related. Does anyone has a solution
> for this? I searched the internet, but I could not find anything that
> could help, primarily because I have not been able to reproduce the
> error with my computers. I had to wait for a web surfer with the
"wrong
> configuration" to access the site.
Browser-based locale setting could certainly cause this to fail. If
you want to force the app to always use English, you should probably
include the following in web.xml:
<context-param>
<param-name>javax.servlet.jsp.jstl.fmt.locale</param-name>
<param-value>en_US</param-value>
</context-param>
If you just want to change that specific tag, try the parseLocale
attribute:
<fmt:parseDate var="birthdate"
value="${param.birthdate}"
pattern="MMM-dd-yyyy"
parseLocale="en_US"/>
> All help appreciated.
>
> Lamine
--
Kris Schneider <mailto:kris@directThought.com>
directThought <http://www.directThought.com/>
---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic