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
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.