JavaBeat

  • Home
  • Java
    • Java 7
    • Java 8
    • Java EE
    • Servlets
  • Spring Framework
    • Spring Tutorials
    • Spring 4 Tutorials
    • Spring Boot
  • JSF Tutorials
  • Most Popular
    • Binary Search Tree Traversal
    • Spring Batch Tutorial
    • AngularJS + Spring MVC
    • Spring Data JPA Tutorial
    • Packaging and Deploying Node.js
  • About Us
    • Join Us (JBC)
  • Privacy
  • Contact Us

JSTL Functions

March 1, 2014 by Krishna Srinivasan Leave a Comment

JSTL function tag library contains set of string manipulation functions that can be used with the JSP Expression Language.

Syntax of JSTL Functions Tag Library

[code lang=”html”]
<%@ taglib uri=”http://java.sun.com/jsp/jstl/functions “prefix=”fn” %>
[/code]

JSTL Function Tags

  • <fn:contains()>: It is used to check whether string contains specified sub string or not.
  • <fn:containsIgnoreCase()>:It returns true if string contains specified substring ,ignores case and also returns true or false based on evaluation condition.
  • <fn:endsWith()>: It returns true if string ends with specified suffix.
  • <fn:escapeXml()>: It is used to escape XML markup characters. It takes only one parameter of type string.
  • <fn:indexOf()>: It returns index for the first occurrence of the specified sub string.
  • <fn:join()>: It is used to join all the elements contained in an array with the specified string.
  • <fn:length()>: It returns number of elements from an array or collection, characters from a string.
  • <fn:replace()> :It is used to replace a string with another string.
  • <fn:split()>: It returns array of string by separating the string with separator.
  • <fn:startsWith()>:It returns true if string starts with prefix.
  • <fn:endsWith()>: It returns true if string ends with prefix.
  • <fn:substring()>: It returns substring of string with begin index till the end index.
  • <fn:substringAfter()>:It returns subset of string after the substring.
  • <fn:substring()>: It returns subset of string before the specific substring.
  • <fn:toLowerCase()>:It returns all the characters of string to lower case.
  • <fn:toUpperCase()>: It returns all the characters of string to upper case.
  • <fn:trim()>: It is used to remove white spaces from the start and end of the string.

Previous Tutorial :  JSTL SQL sql:setDataSource Tag :: Next Tutorial : JSTL Function fn:substringAfter()

Filed Under: Java EE Tagged With: JSTL Tutorials

About Krishna Srinivasan

He is Founder and Chief Editor of JavaBeat. He has more than 8+ years of experience on developing Web applications. He writes about Spring, DOJO, JSF, Hibernate and many other emerging technologies in this blog.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Follow Us

  • Facebook
  • Pinterest

As a participant in the Amazon Services LLC Associates Program, this site may earn from qualifying purchases. We may also earn commissions on purchases from other retail websites.

JavaBeat

FEATURED TUTORIALS

Answered: Using Java to Convert Int to String

What is new in Java 6.0 Collections API?

The Java 6.0 Compiler API

Copyright © by JavaBeat · All rights reserved