Make a variable in upper or lower case in jsp.

Making a variable/String in upper or lower case is known by all, we just have to do the following :

String str=”hello”;

String UpperStr=str.toLowerCase();

That is, there is an inbuilt function in java to do the same.

In jsp, you can do the following :

<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<c:set var="count" value="{(fn:toLowerCase(count.isocode)}" >
And then you can use the value of count in any c:if or c:out you want. 

		
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s