Yuri Peter Kazakov wrote:
 > According the documentation of JSTL 1.0
 > The <fmt:formatDate /> should output a current date and time.

No, not in the final version of the JSTL 1.0 spec, available at
<http://java.sun.com/products/jsp/jstl/>. The behavior you describe
was in one of the preliminary versions of the spec but was removed
because of different interpretations between containers about how
a custom action with an empty body should be handled, leading to
portability problems.

 > But even in fmt.tld and fmt-rt.tld the value attribute is required.
 > I downloaded JSTL final release yesterday.
 >
 > I am preparing a presentation of JSTL for my company
 > development section, so I  wouldn't like to any scriptlets
 > as value="<%=new Date()%> " in my demo.

You can create a java.util.Date instance that represents the current
time and then format it:

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

 > [...]

Hans
-- 
Hans Bergsten           [EMAIL PROTECTED]
Gefion Software         http://www.gefionsoftware.com
JavaServer Pages        http://TheJSPBook.com


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

Reply via email to