commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark R. Diggory" <mdigg...@latte.harvard.edu>
Subject Re: [configuration] Accessing from EL script
Date Tue, 18 May 2004 13:20:07 GMT
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


Mime
View raw message