struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zoran Avtarovski <zo...@sparecreative.com>
Subject Re: What is wrong with my with OGNL Map expression??
Date Fri, 01 May 2009 00:09:53 GMT
Just to reiterate what Dale said, we┬╣ve taken to using the %{} across the
board as we were having problems with conflicts. In my experience this has
slowed my hair loss significantly.

Z.
> 
> Michael Griffith wrote:
>>  > I have a Map<String,String> in the HttpSession
>>  > The map is stored in the session as an attribute named
>>  > genieProperties...
> 
> Kishan G. Chellap Paandy wrote:
>> > Assuming there's an attribute with name 'mySessionAttribute' in the
>> > Session scope 
>> > <s:property value="%{#session.mySessionAttribute}" />
> 
> Which gets you half way there.  It gets you the Map.  To get the value
> you want from it, just call it's get method:
> 
> <s:property value="%{#session.genieProperties.get('url')}" />
> 
> The %{} are often left out by people, but they're critical.  That's what
> says "this is an OGNL expression".  Musachy's response illustrates the
> potential confusion as to what EL you're using when it's not specified.
> 
> -Dale
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message