Good Morning Michael--
If I understand your question correctly the expression needs to be enclosed in
${} as in this example from Ted Husted
- <c:choose>
- <c:when test="${not empty jcookie}">
- <%-- The functionality of "logic:match" will eventually be available
- through a string function in the EL
expression. --%>
- <logic-el:match expr="${jcookie}" value="0">
- match
- </logic-el:match>
- <logic-el:notMatch expr="${jcookie}" value="0">
- notMatch
- </logic-el:notMatch>
- </c:when>
- <c:otherwise>
- missing
- </c:otherwise>
- </c:choose>
(link available @)
http://mail-archives.apache.org/mod_mbox/struts-dev/200602.mbox/[EMAIL
PROTECTED]
Anyone else?
Martin --
> Hi, everyone;
>
> I am new to struts. Need someone help me.
>
> Version:Struts 1.2.9, jsp 2.4, tomcat,5.0.28
> Question about: struts-el, c.tld
>
> in c.tld, not c-rt.tld
>
> 1.Document said, difference between el and standard is rtexpression.
> ${xxx} is supportted in EL tags, but in standard tags, ${xxx} give me the
> correct answer, and <%=xx%> give me error. Why?
>
> 2.Document said logic:equal is not implete as c:if can do the same thing,
> but <logic:equal name="a" value="1">
> can be rewritten in <c:if>, as test attribute can't be rtexpression.
>
> 3.c:forEach not support array?
> in Action
> request.setAttribute("a",a); //String[] a; with two item
>
> in jsp
> <c:forEach items="a" varStatus="i">
> ${a[i.index]}
> </c:forEach>
> only loop once, and give me the first value
>
> the following code ,give me two line, but I can't get the end tag dynamically.
> <c:forEach begin="0" end="1" varStatus="i">
> ${a[i.index]}
> </c:forEach>
>
> 4.c:if test is not do the job. the following code
> <c:forEach items="a" varStatus="i">
> ${i.first?"Y":"N"}
> <c:if test="i.first">"Y"</c:if>
> </c:forEach>
> ${i.first?"Y":"N"} give me the correct result, but
> <c:if test="i.first">"Y"</c:if> not.
> where is the mistake?
>
> 5.It seems, via pageContext findAttribute and setAttribute, we can pass value
> from/to EL, I am not tested, is this the right way to resolve problem? I mean
> as rtexpression can't be used in these tags, we first do some calcute, then
> set
> the result to el, and use it in tags.
>
> 6.c-rt is not work for me!
> change c.tld to c-rt.tld, access the page, tomcat didn't give me the answer,
> just wait, and without error.
>
> Thanks a lot.
>
> Regards;
> Michael
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>