David Goodenough wrote:
In an early version of JSTL (one prior to proper release) I seem to recall
that leaving the value out of a fmt:formatDate tag defaulted to using the
value of "now" as the time/date to format.  This seems to have vanished
from the released version.  Firstly why the change, and secondly what is
the approved method, preferably without resorting to Java, of formatting
the current time.  The best I have found is to jsp:useBean with class
java.util.Date, which will default to now, and format that.

Thanks in advance

David

Can't remember exactly why it was dropped, but I'm sure there was a good reason :-). We had then added the following text in the spec (Section 9.9) to make sure questions like yours would be answered in the spec itself:

  In order to format the current date and time, a <jsp:useBean>
  action may be used as follows:

  <jsp:useBean id="now" class="java.util.Date" />
  <fmt:formatDate value="${now}" />


-- Pierre




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






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



Reply via email to