Summary of JSTL Standard functions

Source: Internet
Author: User

Jstl Standard Functions

The declaration of a standard function must be introduced in the JSP before using these functions

<%@ taglib prefix= "FN" uri= "Http://"%>

The following is a list of the methods that are in JSTL and their descriptions

Name of function

Function description

Examples of Use


Determine if a string contains another string

<c:if test= "${fn:contains (name, SearchString)}" >


Determines whether a string contains another string ( case -insensitive )

<c:if test= "${fn:containsignorecase (name, SearchString)}" >


Determines whether a string ends with a different string

<c:if test= "${fn:endswith (filename,". txt ")}" >


Turn some characters into XML representations, such as < characters should be converted to <

${fn:escapexml (Param:info)}


The position where the substring appears in the parent string

${fn:indexof (Name, "-")}


Unites the data in the array into a new string and uses the specified character format to open the

${fn:join (Array, ";")}


Gets the length of the string, or the size of the array

${fn:length (Shoppingcart.products)}


Replace the character specified in the string

${fn:replace (Text, "-", "?")}


Segmentation the string according to the specified word

${fn:split (Customernames, ";")}


Determines whether a string starts with a substring

<c:if test= "${fn:startswith (," 100-")}" >


Get child string

${fn:substring (Zip, 6,-1)}


Gets the substring starting at the location of a character

${fn:substringafter (Zip, "-")}


Gets the substring from the beginning to the location of a character

${fn:substringbefore (Zip, "-")}


Convert to lowercase

${fn.tolowercase (}


Convert to uppercase characters

${fn. Uppercase (}


Remove spaces before and after a string

${fn.trim (name)}

Copyright NOTICE: Welcome reprint, Hope in your reprint at the same time, add the original address, thank you with

Summary of JSTL Standard functions

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: 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.