[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Simple Jstl help

Posted on 2005-04-10
3
Medium Priority
?
237 Views
Last Modified: 2013-11-24
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
0
Comment
Question by:Testsubbu
  • 2
3 Comments
 
LVL 92

Accepted Solution

by:
objects earned 1500 total points
ID: 13749422
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
 
LVL 16

Expert Comment

by:suprapto45
ID: 13750583
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
 
LVL 16

Expert Comment

by:suprapto45
ID: 13750590
Hi Testsubbu,

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

Regards
Dave
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
Suggested Courses
Course of the Month18 days, 22 hours left to enroll

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question