[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jakarta-commons-dev
Subject:    Re: [configuration] Accessing from EL script
From:       Brent Verner <brent () rcfile ! org>
Date:       2004-05-18 13:08:16
Message-ID: 20040518130816.GB36459 () rcfile ! org
[Download RAW message or body]

[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

-- 
"Develop your talent, man, and leave the world something. Records are 
really gifts from people. To think that an artist would love you enough
to share his music with anyone is a beautiful thing."  -- Duane Allman

---------------------------------------------------------------------
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