JSTL function tag library fn tag_html/css_WEB-ITnose
Before using the jstl function tag library, you need to introduce it into the page:
<%@ taglib prefix="fn" uri="http://java.sun. com/jsp/jstl/functions"%>
1. fn:contains(string, substring)
If the parameter string contains the parameter substring, return true.
2. fn:containsIgnoreCase(string, substring)
If the parameter string contains the parameter substring (ignore case), return true
3. fn:endsWith(string, suffix)
If the parameter string ends with the parameter suffix, return true.
4. fn:escapeXml(string)
Convert XML (and HTML) with special meaning into the corresponding XML character entity code and return it.
5. fn:indexOf(string, substring)
Returns the position where parameter substring first appears in parameter string.
6. fn:join(array, separator)
String a given array array together with the given separator to form a new string. return.
7. fn:length(item)
Returns the number of elements contained in the parameter item. The parameter Item type is array, collection or String. If it is a String type, the return value is the number of characters in the String.
1 <body> 2 <% 3 String a[] = {"aa","bb","cc","dd"}; 4 request.setAttribute("array",a); 5 request.setAttribute("store","guomei8899"); 6 %> 7 <c:if test="${fn:contains('guomeiddd','guoMei')}">ok</c:if><br> 8 <c:if test="${fn:containsIgnoreCase(store,'guoMei')}">ok ok</c:if><br> 9 <c:if test="${fn:endsWith(store,'99')}">end</c:if><br>10 <c:out value="${fn:escapeXml('<>')}"/><br>11 <c:out value="${fn:indexOf(store,'om')}"/><br>12 <c:out value="${fn:join(array,'|')}"/><br>13 <c:out value="${fn:length(array)}"/><br>14 </body>
8. fn:replace(string, before, after)
Returns a String object. Replace all occurrences of the parameter before string in the parameter string with the parameter after string, and return the replacement result.
9. fn:startsWith(string, prefix)
If the parameter string starts with the parameter prefix, return true.
10. fn:substring(string, begin, end)
Returns the string part of the parameter string, starting from the parameter begin to the parameter end position.
11. fn:substringAfter(string, substring)
Returns the part of the string after the parameter substring in the parameter string.
12. fn:substringBefore(string, substring)
Returns the part of the string in front of the parameter substring in the parameter string.
13. fn:toLowerCase(string)
Changes all the characters in the parameter string to lowercase and returns them.
14. fn:toUpperCase(string)
Changes all the characters in the parameter string to uppercase and returns them.
15. fn:trim(string)
Remove the spaces at the beginning and end of the parameter string and return it.
1 <body> 2 <% 3 String a[] = {"aa","bb","cc","dd"}; 4 request.setAttribute("array",a); 5 request.setAttribute("store","guomei8899"); 6 request.setAttribute("user","u1,u2,u3,u4,u5"); 7 request.setAttribute("test","aBcDeF "); 8 %> 9 <c:out value="${fn:replace(store,'8','9')}"/><br>10 <c:out value="${fn:split(user,',')}"/><br>11 <c:out value="${fn:startsWith(store,'g')}"/><br>12 <c:out value="${fn:substring(store,2,5)}"/><br>13 <c:out value="${fn:substringAfter(store,'mei')}"/><br>14 <c:out value="${fn:substringBefore(store,'mei')}"/><br>15 <c:out value="${fn:toLowerCase(test)}"/><br>16 <c:out value="${fn:toUpperCase(test)}"/><br>17 <c:out value="${test}hoho"/><br>18 <c:out value="${fn:trim(test)}hoho"/><br>19 </body>

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



The article discusses the HTML <progress> element, its purpose, styling, and differences from the <meter> element. The main focus is on using <progress> for task completion and <meter> for stati

HTML is suitable for beginners because it is simple and easy to learn and can quickly see results. 1) The learning curve of HTML is smooth and easy to get started. 2) Just master the basic tags to start creating web pages. 3) High flexibility and can be used in combination with CSS and JavaScript. 4) Rich learning resources and modern tools support the learning process.

The article discusses the HTML <datalist> element, which enhances forms by providing autocomplete suggestions, improving user experience and reducing errors.Character count: 159

The article discusses the HTML <meter> element, used for displaying scalar or fractional values within a range, and its common applications in web development. It differentiates <meter> from <progress> and ex

The article discusses the viewport meta tag, essential for responsive web design on mobile devices. It explains how proper use ensures optimal content scaling and user interaction, while misuse can lead to design and accessibility issues.

The article discusses the <iframe> tag's purpose in embedding external content into webpages, its common uses, security risks, and alternatives like object tags and APIs.

HTML defines the web structure, CSS is responsible for style and layout, and JavaScript gives dynamic interaction. The three perform their duties in web development and jointly build a colorful website.

AnexampleofastartingtaginHTMLis,whichbeginsaparagraph.StartingtagsareessentialinHTMLastheyinitiateelements,definetheirtypes,andarecrucialforstructuringwebpagesandconstructingtheDOM.
