Jstl is a sun-defined standard, implemented by Apache, so to download the jar package to Apache, to see the API documentation, go to SUN,API document here: HTTP://JAVA.SUN.COM/PRODUCTS/JSP/JSTL/1.1/ Docs/tlddocs/index.html
<%@ taglib prefix= "FN" uri= "Http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix= "FMT" uri= "Http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix= "C" uri= "Http://java.sun.com/jsp/jstl/core"%>
C Tag Library Use does not introduce, simple write down a few common
1, C:fortokens
Similar to the Split function in JS and Java, a string is divided into groups of characters and processed one by one. Items is the original string to be processed, Delims is the delimiter
<c:fortokens var= "Item" items= "www.trs.com.cn" delims= "." >
${item}<br/>
</c:forTokens>
2, Fmt.tld more useful fmt:parsedate, Fmt:formatdate, Fmt:parsenumber, Fmt:formatnumber, used to format time and numbers, examples are as follows:
<fmt:formatdate value= "${item.createdtime}" pattern= "Yyyy-mm-dd hh:mm"/>
3, the function of Fn.tld,jstl, which has
Fn:contains determine if a string contains another string, eg <c:if test= "${fn:contains (str, searchstring)}" >;
Fn:containsignorecase with the above tag, just not the case-sensitive;
Fn:endswith determines whether a string ends with a word, eg <c:if test= "${fn:endswith (filename,". txt ")}" >
Fn:escapexml converts a string to a string that does not have an XML unrecognized character, eg ${fn:escapexml (info)}
Fn:indexof determines the position of a character in a string, eg ${fn:indexof (name, "-")}
Fn:join with Jsjoin, the array is spliced with characters, eg ${fn:join (array, ";")}
Fn:length calculating the length of a string
Fn:replace Replace a string, eg ${fn:replace (text, "-", "?")}
Fn:split join reverse process, eg ${fn:split (Customernames, ";")}
Fn:startswith whether to start with a string, eg <c:if test= "${fn:startswith (product.id," 100-")}" >
Fn:substring get string, eg ${fn:substring (zip, 6,-1)}
Fn:substringafter starts a string from a string, eg ${fn:substringafter (Zip, "-")}
Fn:substringbefore the reverse process of the previous article
Fn:touppercase to capitalize all characters in a string
Fn:trim remove spaces on both sides of the string, eg ${fn.trim (name)}
From for notes (Wiz)
JSTL C tags, fn tags, fmt tags-live on the island of Java-Iteye technology website