On Nov 25, 2005, at 5:39 AM, hepabolu wrote:

Can someone please explain why:

<jx:set var="mydate" value="${java.util.Date()}"/>

and

<jx:out value="${java.util.Date()}"/>

result in nothing

and

<jx:formatDate value="${java.util.Date()}" pattern="yyyyMMdd"/>

results in 'Cannot format given Object as a Date'?

Yes — it's because inside '${}', the language is JExL, and you are trying to treat it as Java. The meaning of:

        ${java.util.Date()}

is "take the result of calling the method named 'Date' of the property named 'util' of the object named 'java' in my context". JExL doesn't know about constructors nor about the Java package syntax.

HTH,
—ml—

Reply via email to