Bug 8350

Summary: fmt:parseDate fails when pattern attribute is used
Product: Taglibs Reporter: Prasad Subramanian <prasad.subramanian>
Component: Standard TaglibAssignee: Tomcat Developers Mailing List <dev>
Status: CLOSED INVALID    
Severity: critical    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   

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.