You can access anything that follows JavaBean standards. (get/setXXX)(isXXX)etc.
-----Original Message----- From: Martin Smith [mailto:[EMAIL PROTECTED] Sent: Thursday, September 04, 2003 9:34 AM To: Tag Libraries Users List Subject: RE: using <c:if> tag to work out if one date is less than another. Thank-you Kris, works like a dream. Am I right in thinking you can access any property on any object in the expression language as long as the method name begins with 'get'? Martin -----Original Message----- From: Kris Schneider [mailto:[EMAIL PROTECTED] Sent: 04 September 2003 13:31 To: Tag Libraries Users List Subject: Re: using <c:if> tag to work out if one date is less than another. <jsp:useBean id="now" class="java.util.Date"/> ... <c:choose> <c:when test="${fixture.kickoffDate.time lt now.time}"> ... </c:when> <c:otherwise> ... </c:otherwise> </c:choose> ... Quoting Martin Smith <[EMAIL PROTECTED]>: > Hi, > > I'm trying to use the <c:if> tag to determine if one date is before or > after > another. My code is at the bottom of this email. > > fixture.kickoffDate returns a java.util.Date object. Can I use .time to > get > me a long? > > I realise that I can't put the System.currentTimeMillis code in, but how > can > I get the > current system time in to a scripting variable?? > > > <table> > <tr> > <c:if test="${fixture.kickoffDate.time < System.currentTimeMillis}" > > <td> Kick off is less than system time </td> > </c:if> > <c:if test="${fixture.kickoffDate.time > System.currentTimeMillis}" > > <td> Kick off is greater than system time </td> > </c:if> > </tr> > </table> > > Using Tomcat 4.1.18 and JSTL 1.0 -- Kris Schneider <mailto:[EMAIL PROTECTED]> D.O.Tech <http://www.dotech.com/> --------------------------------------------------------------------- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]