On Fri, 11 Oct 2002, James Cook wrote:

> What is the tie-in between JSP 2.0 and the Expression Language? It
> seems to have been introduced in a "low-power" version in the JSTL 1.0
> spec, but I am reading that it will support function-type calls when
> JSP 2.0 is released?

The JSP 2.0 Proposed Final Draft includes the following enhancements to
the expression language:

 - It is now available in template text and the attributes of template XML
   tags, as in

     Hi there, ${user}.

   and

     <font color="${color}"> ... </font>

 - It lets you define custom functions to be used.

> Is JSP 2.0 going to include a newer version of JSTL, and the JSTL
> upgrade will include a better EL? Or is the EL going to be used in
> broader areas than just the JSTL?

JSTL 1.1 will be a synchronization release of JSTL associated with JSP
2.0.

> Will this new, improved EL support reflection-like function calls, and
> will we be able to:
> 
> ${mybean.customer(${page.range} * 2)}

Yes, though the syntax will work differently from what you have
assumed; it will instead look like

 ${mybean.customer(pageScope.range * 2)}

Note 'pageScope' instead of 'page' (this stays the same between JSTL 1.0
and JSTL 1.1 / JSP 2.0), and the fact that "${}" still refers to an entire
expression, not a single variable reference.

-- 
Shawn Bayern
"JSTL in Action"   http://www.jstlbook.com


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

Reply via email to