JSTL – toLowerCase()



The fn:toLowerCase() function converts all the characters of a string to lowercase.

Syntax:

The fn:toLowerCase() function has following syntax:

java.lang.String toLowerCase(java.lang.String)

JSTL Example :

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>

<html>
<head>
<title>JSTL Tutorial</title>
</head>
<body>

<c:set var="str1" value="www.c4LEARN.com"/>
<c:set var="str2" value="${fn:toLowerCase(str1)}" />

<p>Final Output : ${str2}</p>

</body>
</html>

Output :

Final Output : www.c4learn.com