| Author |
Problem with JSTL date
|
Justin Howard
Ranch Hand
Joined: Feb 19, 2009
Posts: 162
|
|
Hi All,
I am trying to display the date from the database. If I do not apply any formatting it displays correctly, but if I apply any formatting it does not display.
Also, how can I display the current date and Time of New York, irrespective of the login location of the user in jstl?
Thanks
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56230
|
|
|
What does a View Source in the browser reveal?
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Justin Howard
Ranch Hand
Joined: Feb 19, 2009
Posts: 162
|
|
The view source ::
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56230
|
|
Whenever something isn't displaying correctly, this should always be your first debugging step.
So now you know that you need to figure out why your JSTL tags aren't evaluating.
|
 |
Justin Howard
Ranch Hand
Joined: Feb 19, 2009
Posts: 162
|
|
I added this
but now it is throwing an exception
How should I display it. All the examples on the net are like this
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56230
|
|
Probably the wrong URI.
You haven't provided what versions of JSP and JSTL you are using as directed by the forum instructions.
|
 |
Justin Howard
Ranch Hand
Joined: Feb 19, 2009
Posts: 162
|
|
JSP :: 2.5/2.1
I have jstl.jar and jstl-standard.jar in my build path.
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56230
|
|
|
For that version of JSP, make sure that you have the JSTL 1.2 (again, you didn't say which version) jar in your WEB-INF/lib (there's only one jar file needed) and fix your JSTL URI. The one you are using is for JSTL 1.0.
|
 |
Justin Howard
Ranch Hand
Joined: Feb 19, 2009
Posts: 162
|
|
Thanks a lot!
I had one more question.
how can I display the current date and Time of New York, irrespective of the login location of the user in jstl?
Thanks
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56230
|
|
|
Specify the time zone.
|
 |
rmail kumar
Greenhorn
Joined: Jun 09, 2008
Posts: 9
|
|
Hello friend
use the code it will work
<fmt:formatDate value="" pattern="" />
|
 |
 |
|
|
subject: Problem with JSTL date
|
|
|