<%@ taglibprefix="fn"uri="http://java.sun.com/jsp/jstl/function"%>
<%@taglibprefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
…
String[] strs ={"a", "b","c"};
List list = newArrayList();
list.add("a");
pageContext.setAttribute("arr",strs);
pageContext.setAttribute("list",list);
%>
${fn:length(arr)}<br/><!--3-->
${fn:length(list)}<br/><!--1-->
${fn:toLowerCase("Hello")}<br/> <!-- hello -->
${fn:toUpperCase("Hello")}<br/> <!-- HELLO -->
${fn:contains("abc","a")}<br/><!-- true -->
${fn:containsIgnoreCase("abc","Ab")}<br/><!-- true -->
${fn:contains(arr,"a")}<br/><!-- true -->
${fn:containsIgnoreCase(list,"A")}<br/><!-- true -->
${fn:endsWith("Hello.java",".java")}<br/><!-- true -->
${fn:startsWith("Hello.java","Hell")}<br/><!-- true -->
${fn:indexOf("Hello-World","-")}<br/><!-- 5 -->
${fn:join(arr,";")}<br/><!-- a;b;c -->
${fn:replace("Hello-World", "-","+")}<br/><!-- Hello+World --> 替换字符
${fn:join(fn:split("a;b;c;",";"), "-")}<br/><!-- a-b-c -->
${fn:substring("0123456789",6, 9)}<br/><!-- 678 -->
${fn:substring("0123456789",5, -1)}<br/><!-- 56789 -->
${fn:substringAfter("Hello-World","-")}<br/><!-- World -->
${fn:substringBefore("Hello-World","-")}<br/><!-- Hello -->
${fn:trim(" a b c ")}<br/><!-- a b c -->
${fn:escapeXml("<html></html>")}<br/><!-- <html></html> -->
EL中Map取得特定key的值
<c:out value="${map[key] }"/>