The below worked for me. If you are getting <str:countMatches ....> output, make sure that you are including the taglib and the prefix you are using is the same ("str" in your case, but "string" for me) E.g., <%@ taglib prefix="string" uri="http://jakarta.apache.org/taglibs/string-1.0.1" %>
<string:countMatches var="myVar" substring="world"> Hello world programs are rife in this world due to their worldy view of how to program a world of code</string:countMatches> <c:out value="count is ${myVar}"/> -ed On 7/29/05, temp temp <[EMAIL PROTECTED]> wrote: > I want index of substring from a string . I would > like to acheive this using jsp tags. I found > jakarta taglib countMatches tag which would print > no of times substring is present in the > string.Rather than printing I want to capture the > output from this jsp tag into a variable .This tag > also provides this ability by declaring var > attribute which will capture the result of this tag. > My problem is I am unable to declare a var attribute > in this jsp tag or I doing somethig wrong with the > syntax of this tag.Can somebody guide me the proper > syntax for using this tag. > > <str:countMatches substring="world">Hello world > programs are rife in this world due to their worldy > view of how to program a world of > code</str:countMatches> > thanks & regards > > > > > ____________________________________________________ > Start your day with Yahoo! - make it your home page > http://www.yahoo.com/r/hs > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]