Return-Path: Delivered-To: apmail-jakarta-taglibs-dev-archive@apache.org Received: (qmail 57994 invoked from network); 2 Apr 2002 22:31:19 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 2 Apr 2002 22:31:19 -0000 Received: (qmail 11461 invoked by uid 97); 2 Apr 2002 22:31:23 -0000 Delivered-To: qmlist-jakarta-archive-taglibs-dev@jakarta.apache.org Received: (qmail 11395 invoked by uid 97); 2 Apr 2002 22:31:22 -0000 Mailing-List: contact taglibs-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tag Libraries Developers List" Reply-To: "Tag Libraries Developers List" Delivered-To: mailing list taglibs-dev@jakarta.apache.org Received: (qmail 11376 invoked from network); 2 Apr 2002 22:31:22 -0000 X-MimeOLE: Produced By Microsoft Exchange V6.0.4712.0 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: JSTL - question about formatDateSupport and BodyContent Date: Tue, 2 Apr 2002 16:31:18 -0600 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: JSTL - question about formatDateSupport and BodyContent Thread-Index: AcHalhd+xSsE2xZUSB+EBevZtWtb7Q== From: To: X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N In using the JSTL example formatDateTime.jsp, I don't get any dates displayed. In the examples, the current date is supposed to be displayed since "value" is not specified and the tags don't have a body. The problem is that getBodyContent() returns an empty string for the tags in the example JSP. Since the code from FormatDateSupport below only uses the current date when the value attribute is not specified AND getBodyContent() is null, no dates show up in the browser. if (!valueSpecified && (getBodyContent() =3D=3D null)) { // 'value' missing, use current date value =3D new Date(); }=20 I discovered that when I close the tag without using the shorthand notation: instead of: It works -- I get the current date. getBodyContent does NOT return null when using the shorthand notation, but returns an empty String instead. I'm using the standard beta 1 version of JSTL on Tomcat 4.0.1. Is this a bug in the tag? Should the code above check for an empty string as well as null when determining whether to use the current date? It seems to me that getBodyContent() should have the same behavior regardless of shorthand (/>) or normal empty tag notation -- however I could not find a definition of what constitutes an empty tag in the JSP 1.2 spec. What gives? Thanks. Brennan -- To unsubscribe, e-mail: For additional commands, e-mail: