JSTL - toUpperCase()

The fn:toUpperCase() function converts all the characters of a string to uppercase.

Syntax:

The fn:toUpperCase() 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:toUpperCase(str1)}" />
<p>Output string : ${str2}</p>
</body>
</html>

Output :

Output string : WWW.C4LEARN.COM