If yor page is blank it is usually because an exception has been thrown.
Check your server log.

In our case our value objects have Date or Timestamp.  Often we will also
put the value object in the form bean and put the value out when
using the bean:write tag:
<bean:write name="myForm" property="myValueObject.myDate"  formatKey
="key"/>

Also instead of the formatKey, you could also use the format property and
just put the format mask directly into the tag.
format="EEEE MMMM d, yyyy" . When you find the right combination, change it
to the formatKey.
(you don't have to keep restarting the app).






Cathy Osekizoglu <[EMAIL PROTECTED]> on 09/23/2002 04:05:09 PM

Please respond to "Struts Users Mailing List"
       <[EMAIL PROTECTED]>

To:    Struts Users Mailing List <[EMAIL PROTECTED]>
cc:

Subject:    Re: bean:write and Date format



 Jeff:
I am using struts1.1. I tried use formatKey as you discribed, but the whole
page becomes balnk. So I guess I need to "put Date or Timestamp to my
page".
How can I put date ot Timestamp in my page. Sorry for the simple question.
I am new to java and jsp.

Thanks
  [EMAIL PROTECTED] wrote:
If you are using Struts 1.1 then you can use the formatKey attribute of the
tag

formatKey="format.date.long"

with a key in you properties file as such: format.date.long=EEEE MMMM d,
yyyy
** I think this only works if you are putting Date or Timestamp to the
page.


If not 1.1 then I guess you could a helper method is the form bean that
formats the date called
String getDateFormatted() ..





Cathy Osekizoglu on 09/23/2002 03:17:42 PM

Please respond to "Struts Users Mailing List"


To: [EMAIL PROTECTED]
cc:

Subject: bean:write and Date format



Using , I got the date as:"
Fri Aug 24 23:42:00 EDT 2002."

How can I change it to " Fri Aug 24 02 23:42 " using struts tag?

Thank you for your help.

Cathy



---------------------------------
Post your free ad now! Yahoo! Canada Personals








--
To unsubscribe, e-mail:
For additional commands, e-mail:



---------------------------------
Post your free ad now! Yahoo! Canada Personals








--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to