I'm encountering developers who question the value of the EL, since it often
isn't really much different than using Java as a scripting language.  Using
Java as a scripting language in JSP pages is more akin to JavaScript, it
seems, than it is to the EL. See the snippet below for an example of what I
showed some developers -- both gave that argument and thought that having
that "getFoo().getBar()" is easier to understand than "foo.bar".  Any
counterarguments from those experienced in working with the JSTL expression
language support? 

Steve


Here's a snippet from the Sun JSTL tutorial about EL support
that I showed to two developers:

"A primary feature of JSTL is its support for an expression 
language. Currently, a page author has to use an expression 
<%= aName %> to access the value of a system or user-defined 
JavaBeans component. For example: 

   <x:aTag att="<%= pageContext.getAttribute("aName") %>"> 
 

Furthermore, referring to nested bean properties is even more 
complex: 

   <%= aName.getFoo().getBar() %>
 

This makes page authoring more complex than it need be. An 
expression language allows a page author to access an object 
using a simplified syntax such as 

   <x:atag att="$aName"> 
 

for a simple variable or 

   <x:aTag att="$aName.foo.bar"> 
 
for a nested property."



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to