In this section ,we will learn how to use fn:toUpperCase and fn:toLowerCase Tag of JSTL.
In this section ,we will learn how to use fn:toUpperCase and fn:toLowerCase Tag of JSTL.In this section ,we will learn how to use fn:toUpperCase
and fn:toLowerCase Tag of JSTL. These tags are used to change
case of specified string to upper or lower. This takes string type as argument.
EXAMPLE:
In this Example, the user enters the value of string, which he wants to change it's case(i.e lowercase or uppercase). The c:if tag of JSTL checks whether requirement is 'uppercase' or' lowercase' & convert it accordingly using "fn:toUpperCase()" or " fn:toLowerCase()" method of JSTL.
changeCaseJSTL.jsp
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> < html> <head>Enter String here and select case as per your choice. <table></ html> |
OUTPUT :

After submitting Value the output will be :
