Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

fmt:parseDate -month digit setting

843838Aug 14 2006 — edited Aug 14 2006
Hello Everyone!

In using <fmt:parseDate>, In the month attribute value: If the months value is not inputted in the format of 01,02,03 ... for (January, February, March)
displaying the page with the following snippet code:
 <fmt:parseDate var="dateValue" value="${birthDateYear}${birthDateMonth}${birthDateDay}" type="date" pattern="yyyyMMdd" />
 <c:if test="${dateValue != ''}">
     <fmt:formatDate value="${dateValue}" pattern="yyyyMMdd
 </c:if>
it returns an exception:
javax.servlet.jsp.JspException: <parseDate> within,value attribute cannot be parse: "1981531"
because, entering single digit for May month, which is 5 causes error.
That is why, I used the simple <c:out>script for printing yr, month and day the user entered.

Is there any idea about this?

Thanks and Cheers (^-^)/

yuubouna
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 11 2006
Added on Aug 14 2006
2 comments
218 views