struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Pontarelli <>
Subject Re: [struts-dev] [s2] OGNL abstracted (was Struts 2 and OGNL findings)
Date Mon, 18 Feb 2008 23:18:06 GMT
Yeah, this is one of the frustrations that most beginners encounter and 
that I'd really like to fix. I'd say it should be ${} or #{} so that it 
is the same notation in JSPs, XML, etc. In fact, I would think that it 
would make the most sense to follow the UEL convention such that ${} is 
immediately evaluated and #{} is evaluated later. So, in the case of XML 
and annotations, it would probably be #{} to follow the standard. 
Furthermore, you should be able to use ${} in XML and annotations and it 
is resolved immediately. This would be useful for servlet context values 
(context path, etc), statics, and other types of configuration.

If anyone wants to help catalog all the OGNL usages, this will be the 
first step in getting this stuff changed. I started a wiki page to track 
all this information:


Dale Newfield wrote:
> Brian Pontarelli wrote:
>> I've been trying to catalog all of the cases where OGNL exists and 
>> where it can be replaced.
> Since different ELs specify different mechanisms to state "this is an 
> expression to be evaluated", I wonder what we should do about the 
> delineating characters "%{"/"}" vs. "${"/"}" vs. "#{"/"}", etc.
> Right now in result specifications in struts.xml (when the result 
> supports it, and when parsed) we use ${} to say "this is an expression 
> to be evaluated" even though it's currently ognl (which uses %{}).  
> I'm of several thoughts regarding this.  One one hand since it's OGNL 
> I think it should be %{}.  On the other hand if we're contemplating 
> switching ELs maybe it should not be EL-specific so that the EL can be 
> changed without modifying all the expressions.
> So:  Is it possible to have these change with the EL?  Is it 
> desirable?  If we want to use a single type for all ELs, which should 
> it be?
> -Dale
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message