• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

fmt:formatDate

 
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Sheriff
Posts: 67753
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just referring to this:

http://java.sun.com/products/jsp/jstl/1.1/docs/tlddocs/fmt/formatDate.html
 
Bear Bibeault
Sheriff
Posts: 67753
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
so what I am doing above, should always give formatted dates properly on display?
 
Bear Bibeault
Sheriff
Posts: 67753
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have no idea what <channel> is.
 
Brian Percival
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Sheriff
Posts: 67753
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yes yes. it is the same http url that the flash client hits internally.
 
Bear Bibeault
Sheriff
Posts: 67753
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Sheriff
Posts: 67753
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I will do that.. Thanks
 
them good ole boys were drinking whiskey and rye singin' this'll be the day that I die. Drink tiny ad.
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic