You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Arne Brutschy <ma...@studserv.uni-leipzig.de> on 2003/11/06 09:47:05 UTC
Re[4]: EL Expression in html:hidden tag
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?
Thanks,
Arne
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: Re[4]: EL Expression in html:hidden tag
Posted by Kris Schneider <kr...@dotech.com>.
Yup, that's the theory anyway. As of JSP 2.0 (with a Servlet 2.4 format web.xml
that has not explicity deactivated EL evaluation), request-time attribute values
can be specified using either the familiar scriptlet expression (<%= %>) or the
EL (${}). So, any pre-JSP 2.0 tags that have attributes with
<rtexprvalue>true</rtexprvalue> in their TLD file will automatically be able to
use the EL for request-time attribute values.
Quoting Arne Brutschy <ma...@studserv.uni-leipzig.de>:
> 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?
>
> Thanks,
> Arne
--
Kris Schneider <ma...@dotech.com>
D.O.Tech <http://www.dotech.com/>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: Re[4]: EL Expression in html:hidden tag
Posted by "Craig R. McClanahan" <cr...@apache.org>.
Quoting Arne Brutschy <ma...@studserv.uni-leipzig.de>:
> 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: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org