Return-Path: Delivered-To: apmail-jakarta-taglibs-user-archive@apache.org Received: (qmail 7662 invoked from network); 5 Feb 2003 20:00:55 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 5 Feb 2003 20:00:55 -0000 Received: (qmail 22730 invoked by uid 97); 5 Feb 2003 20:02:27 -0000 Delivered-To: qmlist-jakarta-archive-taglibs-user@nagoya.betaversion.org Received: (qmail 22723 invoked from network); 5 Feb 2003 20:02:27 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 5 Feb 2003 20:02:27 -0000 Received: (qmail 1350 invoked by uid 500); 5 Feb 2003 19:59:32 -0000 Mailing-List: contact taglibs-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tag Libraries Users List" Reply-To: "Tag Libraries Users List" Delivered-To: mailing list taglibs-user@jakarta.apache.org Received: (qmail 1284 invoked from network); 5 Feb 2003 19:59:31 -0000 Received: from smtpout01.wamu.net (HELO smtpout.wamu.net) (63.92.194.5) by daedalus.apache.org with SMTP; 5 Feb 2003 19:59:31 -0000 Received: from twmuds009-smtprelay02.wamu.net (twmuds009-smtprelay02 [32.85.29.196]) by smtpout.wamu.net (8.12.4/8.12.4) with ESMTP id h15JxZHa024763 for ; Wed, 5 Feb 2003 11:59:35 -0800 (PST) Received: from exisea001.us.wamu.net (localhost [127.0.0.1]) by twmuds009-smtprelay02.wamu.net (8.12.5/8.12.5) with ESMTP id h15JxXnX011986 for ; Wed, 5 Feb 2003 11:59:34 -0800 (PST) Received: from EXMSEA005.us.wamu.net ([10.53.210.44]) by exisea001.us.wamu.net with Microsoft SMTPSVC(5.0.2195.5329); Wed, 5 Feb 2003 11:58:20 -0800 X-MimeOLE: Produced By Microsoft Exchange V6.0.6334.0 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: accessing static fields/methods from a static class using jstl el Date: Wed, 5 Feb 2003 11:58:20 -0800 Message-ID: <0C260F619E428642BFA6380177C3ADF30263E1@EXMSEA005.us.wamu.net> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: accessing static fields/methods from a static class using jstl el Thread-Index: AcLNT7BDSpY0n8yiS/2DiLS3XgU0GgAACTRA From: "Karr, David" To: "Tag Libraries Users List" X-OriginalArrivalTime: 05 Feb 2003 19:58:20.0819 (UTC) FILETIME=[EEDACE30:01C2CD50] X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N > -----Original Message----- > From: Donald Ball [mailto:dball@rhoworld.com] >=20 > hi, i'm trying to figure out how to access static fields or methods from a > static class using the jstl el. say i've got a class, call it > com.example.Foo, which has a method getBar(). how would i access that > property using jstl el? this doesn't work: >=20 > ${com.example.Foo.bar} >=20 > for, i guess, relatively obvious reasons. any suggestions? this seems like > a really stupid question, but i've been poking around for a while and > can't > figure out a solution without reverting to scriptlets. thanks. The JSTL EL can reference javabean properties, maps, and collections. That's it. The JSTL specification describes this, although I wish it had a concise statement to this effect. You sort of have to figure this out by deduction. One curious strategy for accessing static variables would be to create an object that gets associated with another class, which uses reflection to load all the "static final" members into a map. You could then reference the map entries in the JSTL EL. Obviously, you would have to put that created object into one of the available scopes. --------------------------------------------------------------------- To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: taglibs-user-help@jakarta.apache.org