Simple Jstl help

Dear java experts,
                            I have a situation where i am using the jstl tags to display date.
my code is

<fmt:formatDate value="${test.startTime}" pattern="hh:mm a dd-MMM-yyyy"/>

but if  test.startTime= "01:00 AM 01-Jan-1890",
then i need to display in my jsp  a string like  "BeyondRange"

this is really urgent.


thanks so much,
Testsubbu
TestsubbuAsked:
Who is Participating?
 
objectsConnect With a Mentor Commented:
you'll need to test if the date is within your bounds and display the formatted date if it is, o/wise display your out of bounds message
0
 
suprapto45Commented:
Hi Testsubbu,

What you need to do is to use <c:if tags. However, it that does not really work, you better consider some of the solution using Servlet such as <% %> within your jsp file.

Regards

Dave
0
 
suprapto45Commented:
Hi Testsubbu,

I am not sure that <c:if works on the date format.

Regards
Dave
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.