Dave Newton wrote:
http://struts.apache.org/2.x/docs/can-we-use-jstl-with-the-framework.html
Yah, I saw that. But I also saw this...
http://struts.apache.org/2.x/docs/exposing-framework-objects-to-jstl-with-a-jstl-and-displaytag-example.html
...which, if I'm hearing you correctly, is unnecessary for the EL
portion of JSTL. (And maybe for using JSTL tags at all). And I saw this...
http://struts.apache.org/2.x/docs/using-struts-and-xwork-with-jsp-20-and-jstl-11.html
...which is also, if I' hearing you correctly, completely unnecessary.
So maybe the docs should be updated?
Yes, but OGNL # expressions won't work unless you turn
it off, because # is a UEL escape char. See
http://struts.apache.org/2.x/docs/ognl.html.
Ahhh, understood.
So if I continue to mix naked EL expressions with Struts tags AND if I
use a JSP 2.1 compatible container, then I'll have a problem with any
OGNL "#" expressions I happen use in my struts tags.
Got it. Good to know.
4) How do I get things like the "top" of the stack?
[0]
See
http://struts.apache.org/2.x/docs/ognl-basics.html.
Hmmm. How does that work, exactly? Doesn't EL need an object
identifier to reference the [] notation against?
http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JSPIntro7.html
I know that [] brackets get overloaded to do property, map-key, or
array-index lookups as appropriate. But I was under the impression they
needed to be evaluated against an object, not just naked like that.
Am I the only one who thinks this rocks?
Probably.
There are rumblings of changing either the use of
OGNL, making the EL pluggable, etc. but I'm not sure
where that's at in the process.
Yah, in my searches, I came across a lot of discussion (some of it
mildly heated) about the future of Java Expression Languages.
So before sounding too enthusiastic, let me say that what I don't think
rocks is that, in my JSP pages, I've got to keep in mind that there are
two expression languages at work:
* naked ${} references are using the EL implementation provided by my
Servlet container (in my case JSP 2.0 implemented by commons-EL)
* while expressions within Struts tags (the <property> tag for example)
are using OGNL expressions.
That's just asking for trouble unless clearly spelled out in the code.
But I do LOVE the fact that I can do this:
<a href="/images/${product.name}">${product.name}</a>
Instead of this:
<a href="/images/<property value="product.getName()"/>">
<property value="product.getName()"/>
</a>
So with a mix of naked-EL expressions and Struts tags I can have my
simple interpolation and still standardize against the Struts taglib.
I'll be content with that for now.
What would *really* be great is if I could just do OGNL within the naked
${} string-braces. Now that would make me very happy.
Thanks for the clarifications, Dave!
- Gary
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]