This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

fmt:formatDate

 
Brian Percival
Ranch Hand
Posts: 163
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I ahve this....

the value of the 'value' attribute in fmt:formatDate should be a string as per documentation. channel_ts is a 'Date' object. Am I doing it wrong ?
should the value be channel_ts.toString() ???
[ October 25, 2007: Message edited by: Bear Bibeault ]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64185
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Brian Percival:
the value of the 'value' attribute in fmt:formatDate should be a string as per documentation

Oh?
[ October 25, 2007: Message edited by: Bear Bibeault ]
 
Brian Percival
Ranch Hand
Posts: 163
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64185
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That is incorrect. The spec correctly identifies the type as a java.util.Date.
 
Brian Percival
Ranch Hand
Posts: 163
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
so what I am doing above, should always give formatted dates properly on display?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64185
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have no idea what <channel> is.
 
Brian Percival
Ranch Hand
Posts: 163
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Channel means something to smeone somewhere, basically just a xml root node, in my jsp response, I am more interested in someone confirming that teh jstl syntax I am using in combination with the EL on a Date object to always printin GMT values is correct and should work fine.

The issues isk, when I hit the jsp in a browser, the datand times seem to be formatted properly, but when it is hit in otherways (say in a flash client), the dates and times are not formatted. they seem to get the tostring() version of the dates and times. I just wanto double check that what I am doing in teh jsp is right.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64185
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is the Flash client hitting it on a JSP-aware server?
[ November 01, 2007: Message edited by: Bear Bibeault ]
 
Brian Percival
Ranch Hand
Posts: 163
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes yes. it is the same http url that the flash client hits internally.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64185
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Unless you've got some type of conditional processing going on, the JSP will render the same no matter what client makes the request. Are you sure that it's not the Flash client gumming up the works?
[ November 01, 2007: Message edited by: Bear Bibeault ]
 
Brian Percival
Ranch Hand
Posts: 163
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No clue.. totally frustrated with this.. probably I will just replace teh Date with preformatted stirng and do away with fmt tags altogether.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64185
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Next thing I'd do is to fetch a tool like Tamper Data for FireFox and look at the response text that's being returned to the browser.
 
Brian Percival
Ranch Hand
Posts: 163
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I will do that.. Thanks
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic