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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to