tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From (David M. Karr)
Subject Re: can't reference a class file (field) with el?
Date Fri, 15 Aug 2003 02:06:15 GMT
>>>>> "Solomon" == Solomon Gorlick <> writes:

    Solomon> Hi,
    Solomon> I was trying to use the value of a Java-class' static final field as part
    Solomon> an EL-based value, but it didn't work.  Is this a wierd thing to want (I was
    Solomon> trying to standardize a certain fmt:formatNumber pattern for multiple uses)?
    Solomon> Is it supported and I just have the syntax wrong?  (I traced part of the
    Solomon> code into JSTLVariableResolver.resolveVariable() which appears not to handle
    Solomon> this case.)  It works fine if I hard code the format, or if I reference the
    Solomon> static field using the RT version of the tag.  Here is some sample code:

    Solomon> Any thoughts?

Yes.  You should read the JSTL specification.  It is not a dry unreadable
document.  It says exactly what you can do with it.  It makes it clear you
can't do this.  Search the archives of this list for numerous discussions about
this very point.

David M. Karr          ; Java/J2EE/XML/Unix/C++   ; SCJP; SCWCD

View raw message