Quoting Arne Brutschy <[EMAIL PROTECTED]>:

> Hello,
> 
> Monday, November 3, 2003, 7:20:31 PM, you wrote:
> KS> I'm jumping in late on this thread, but why bother using Struts-EL at all
> under
> KS> JSP 2.0? The original (RT) tags should be magically EL-aware as long as
> the app
> KS> uses a Servlet 2.4 format web.xml, right?
> 
> Oh, really? I didn't know that. So I can work with the normal struts
> lib? I just need to declare a 2.4 web-app?
> 

And run in a Servlet 2.4 / JSP 2.0 container of course ;-)

Not only will EL expressions work for attributes in any tag (as long as the
attribute accepts runtime expressions), it will also work in template text. 
Consider a snippet like this to display a table of stuff from a list of
customer beans in a scoped variable named "customers":

  <table>
    <tr>
      <th>Account Id</th>
      <th>Customer Name</th>
      <th>Total Sales</th>
    </tr>
    <c:forEach var="customer" items="customers">
      <tr>
        <td>${customer.accountId}</td>
        <td>${customer.name}</td>
        <td>${customer.totalSales}</td>
      </tr>
    </c:forEach>
  </table>

JSP 2.0 has lots of other cool things to, including the ability to point at a
chunk of JSP code and treat it just like a tag, without having to write
anything in Java.

> Thanks,
> Arne
> 

Craig


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

Reply via email to