aspose file tools*
The moose likes Struts and the fly likes bean:write datetime Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "bean:write datetime" Watch "bean:write datetime" New topic
Author

bean:write datetime

ameya n
Greenhorn

Joined: May 14, 2007
Posts: 17
how do i show date time on a jsp....using bean:write what do i keep the format ?............ my java bean data type is java.sql.Date from database am getting as getDate("Date") ......am just able to show date and not time.....i want both
Brent Sterling
Ranch Hand

Joined: Feb 08, 2006
Posts: 948
The bean:write tag can take a format parameter which will probably do what you need. The technique that I use is to either format the date when populating the form using a utility method or to call the utility method from some scriptlet code in the JSP. I have thought about creating a custom tag to avoid the scriptlet code, but I have not gotten around to that.

- Brent
ameya n
Greenhorn

Joined: May 14, 2007
Posts: 17
thanks brent ..........TimeStamp solved the problem .......... i now TimeStamp
instead of Date
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: bean:write datetime