Bug 8350 - fmt:parseDate fails when pattern attribute is used
Summary: fmt:parseDate fails when pattern attribute is used
Status: CLOSED INVALID
Alias: None
Product: Taglibs
Classification: Unclassified
Component: Standard Taglib (show other bugs)
Version: unspecified
Hardware: All All
: P3 critical (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-04-21 22:19 UTC by Prasad Subramanian
Modified: 2004-11-16 19:05 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Prasad Subramanian 2002-04-21 22:19:56 UTC
If a fmt:parseDate tag is used as follows:

--------------------------------------------------------------
<fmt:parseDate value="${param.todate}" type="date" pattern="yyyy-mm-dd" 
var="sTo" scope="request"/>

------------------------------------------------------------------
it throws the following error:
--------------------------------------------------------

javax.servlet.jsp.JspException: In <parseDate>, value attribute can not be 
parsed: "01012001" 

---------------------------------------------------------------------

${param.fromdate} correponds to paramter todate=01012001

The problem occurs even if a STring is hardcoded
Comment 1 Jan Luehe 2002-04-24 17:54:01 UTC
The parse exception is expected in this case, since the date string to be parsed
("01012001") does not comply with the specified pattern ("yyyy-mm-dd"). A date
string of the form "2002-04-24" will be parsed successfully.