[prev in list] [next in list] [prev in thread] [next in thread]
List: jakarta-commons-dev
Subject: Re: [configuration] Accessing from EL script
From: "Mark R. Diggory" <mdiggory () latte ! harvard ! edu>
Date: 2004-05-18 13:20:07
Message-ID: 40AA0D87.3040301 () latte ! harvard ! edu
[Download RAW message or body]
Brent Verner wrote:
> [2004-05-18 08:43] Mark R. Diggory said:
> | To extend the subject of refactoring. I want to be able to access
> | Configuration objects from EL references in JSP 2.0.
> |
> | ${sessionScope.config.foo.bar}
>
> I do something similar _with_ properties configuration. The syntax
> I use is
>
> ${sessionScope.config['some.config.key']}
>
> after doing
>
> session.setAttribute("config",someMap);
>
> I'm not sure it is worth the effort to work around the "['...']"
> syntax requirement/limitation, since the key/value configuration
> would have to be copied into something that EL can address
> directly (most simply a Map of Map [[of Map ] ...])
>
> cheers.
> brent
>
Yes, but maintaining a generic Map interface on the objects in the
configuration hierarchy would probably be very beneficial anywhere that
this similar approach of automation/reflection occurs. Would it not? It
probably would make for a simple backwards compatible refactoring.
-Mark
--
Mark Diggory
Software Developer
Harvard MIT Data Center
http://www.hmdc.harvard.edu
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic