On Fri, 1 Nov 2002, Travis McCauley wrote:

> Hello,
>
> I apologize if this has been covered recently. I'm trying to find out
> how to  use EL expressions in the 'with' attribute of a str:replace
> tag. I'm using the 10/8/02 1.0 Release Version.
>

If you grab the latest nightly build [tonights, which should get created
in about an hour or two], then it should support EL expressions in all
attributes [except the var attribute] of all tags.

I've not tested it heavily, my test page is at the bottom of this email,
and I think it shows that things are generally working.

To use the latest nightly jar you'll need to have the standard.jar and all
its accompanying jars available, which is also available from the Jakarta
Taglibs project as the JSTL Standard implementation. Hopefully you're on
this already.

If you use another JSTL implementation, then with help I should be able to
make the String taglib support that.

Hen

<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"; %>
<%@ taglib uri="http://jakarta.apache.org/taglibs/string-1.0"; prefix="str" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt"; %>

<c:forTokens var="token" items="a,e,i" delims=",">
  <str:replace replace="o" with="${token}">I am a bong</str:replace>
</c:forTokens>

<c:set var="poo" value="pooh"/>
<ul>
<li>I am a <str:capitalize><c:out value="${poo}"/></str:capitalize> of little 
brains</li>
<li>I am a <str:upperCase><c:out value="${poo}"/></str:upperCase> of little brains</li>
<li>I am a <str:lowerCase><c:out value="${poo}"/></str:lowerCase> of little brains</li>
</ul>

<c:set var="cot" value="4"/>
<c:set var="cot2" value="2"/>
<p>Six tiggers, or four plus two: <str:repeat count="${cot+cot2}">Tigger 
</str:repeat></p>



--
To unsubscribe, e-mail:   <mailto:taglibs-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:taglibs-user-help@;jakarta.apache.org>

Reply via email to