The datetime tag library that is depending on a broken feature in Tomcat and other servers (WLS 5.1, for example). With servers that properlly implement the JSP 1.2 specification, this library will not work. The following JSP code will not work: <date:format pattern="MM/dd/yyyy" date="<%=new Date()%>"/> The output is: null The format tag is using the doAfterBody() call to place it's output into the JSP. But, since there is no body in the tag, the doAfterBody() function is not called. From looking at the code, the fix would be to have the code that is in the doAfterBody() function be done in the doEnd() function instead (minus the code that actually processes the body). The problem is occuring because the tag library is doing all of the date formating within the doAfterBody() function, and the specification says that "The method (doAfterBody()) is not invoked if there is no body evaluation" (section 10.1.2.2 of the JSP specifcation). Since the function is not called, the variable date_formatted in the tag library is never set, causing the null that is being returned.
Thanks for reporting this. The output for the format tag is now done in the doEnd() instead of doAfterBody(). This change was made 2/23/2002.