fn:toUpperCase tag of Function Tag Library

What is "fn:toUpperCase" tag of Function Tag Library?


"fn:toUpperCase" is a string function of JSP Standard Tag Library(JSTL). This function is used to convert a string to uppercase.



In the above syntax the "string" is of Data type "String".

Example :

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions"
prefix="fn" %>
USERNAME:<input type="text" name="usr" size="25">
<input type="submit" value="Submit">
Your Username in Uppercase::
<c:out value="${fn:toUpperCase(param.usr)}" />

In the above example the username will be converted to uppercase when the form is submitted.The "param" attribute is used to get the username.

Ask Questions

Ask Question