fn:toUpperCase() JSTL Function
fn:toUpperCase() JSTL Function Example explains about How To Use fn:toUpperCase() JSTL Function.
Consider an example where you need to convert a string into capital / uppercase using JSTL function
fn:toUpperCase() function will helps to Convert all the characters of a string to uppercase (Capitalize) letters.
java.lang.String toUpperCase(java.lang.String)
You can see the below example, which is demonstrating fn:toUpperCase() JSTL Function
Required Libraries
fn:toUpperCase() 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 fn:toUpperCase</title> </head> <body> <% // you can also set the values into request scope same as using c:set // request.setAttribute("str", "This is a TEST String"); %> <c:set var="str" value="This is a TEST String" /> ${fn:toUpperCase(str)} </body> </html>
Output
THIS IS A TEST STRING