Jsp:jstl label Fortokens

Source: Internet
Author: User

Fortokens Label
The role of this tag is very similar to the StringTokenizer class in Java, which uses the Items property to specify a specific string, and then assigns a delimiter through the Delims property (which can be specified at the same time) by specifying the delimiter to put items property to group the specified string. Like the ForEach tag, the fortokens tag can also specify begin and end and step property values.
This label is used in the following format:
<c:fortokens items= "Stringoftokens" delims= "delimiters" var= "varName" [varstatus= "Varstatusname"]
[begin= "Begin"] [end= "End"] [step= "Step"]>
Body Content
</c:forTokens>
The individual attributes in the tag are described below:
var: the name of the parameter to iterate over.
Items: The specified string to label.
Varsatus: status information for each iteration.
Delims: Uses the delimiter specified by this property to split the string specified by the items.
Begin: The position at which the iteration begins.

End: The position at which the iteration ends.
Step: The step size of the iteration.

Although ForEach can also iterate tokenstring, for example, the following code:
<c:foreach var= "value" items= "NUM1,NUM2,NUM3" >
<c:out value= "${value}"/>
</c:forEach>
But the fortokens tag is more powerful when it comes to handling tokenstring.

  

Jsp:jstl label Fortokens

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.