SlideShare a Scribd company logo
SESSION – 11
By→ Anuj Kumar Singh
JSTL Function Tags
The JSTL function provides a number of standard functions, most of
these functions are common string manipulation functions. The syntax
used for including JSTL function library in your JSP is:
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
JSTL Functions Description
fn:contains() It is used to test if an input string containing the specified substring in a
program.
fn:containsIgnoreCase() It is used to test if an input string contains the specified substring as a case
insensitive way.
fn:endsWith() It is used to test if an input string ends with the specified suffix.
fn:escapeXml() It escapes the characters that would be interpreted as XML markup.
fn:indexOf() It returns an index within a string of first occurrence of a specified substring.
fn:trim() It removes the blank spaces from both the ends of a string.
fn:startsWith() It is used for checking whether the given string is started with a particular
string value.
fn:split() It splits the string into an array of substrings.
fn:toLowerCase() It converts all the characters of a string to lower case.
JSTL Function list
fn:toUpperCase() It converts all the characters of a string to upper case.
fn:substring() It returns the subset of a string according to the given start and end position.
fn:substringAfter() It returns the subset of string after a specific substring.
fn:substringBefore() It returns the subset of string before a specific substring.
fn:length() It returns the number of characters inside a string, or the number of items in a
collection.
fn:replace() It replaces all the occurrence of a string with another string sequence.
1. JSTL fn:contains() Function
The fn:contains() is used for testing if the string containing the specified
substring. If the specified substring is found in the string, it returns true
otherwise false.
Syntax
boolean contains(java.lang.String, java.lang.String)
Example
a. newjsp.jsp
Output
The case-
sensitivity
matters here
2. JSTL fn:containsIgnoreCase() Function
1. The fn:containsIgnoreCase() function is used to test if an input string
contains the specified substring as a case insensitive way. During
searching the specified substring it ignores the case.
2. The syntax used for including the fn:containsIgnoreCase() function is:
boolean containsIgnoreCase(java.lang.String, java.lang.String)
Example
a. newjsp.jsp
Output
3. JSTL fn:endsWith() Function
The fn:endsWith() function is used for testing if an input string ends with
the specified suffix. If the string ends with a specified suffix, it returns
true otherwise false.
Syntax
boolean endsWith(java.lang.String, java.lang.String)
Example
a. newjsp.jsp
Output
4. JSTL fn:escapeXml() Function
The fn:escapeXml() function escapes the characters that would be
interpreted as XML markup. It is used for escaping the character in XML
markup language.
Syntax
java.lang.String escapeXml(java.lang.String)
Example
a. newjsp.jsp
Output
5. JSTL fn:indexOf() Function
The fn:indexOf() function return an index of string. It is used for
determining the index of string specified in substring.
Syntax
int indexOf(java.lang.String, java.lang.String)
Example
a. newjsp.jsp
Output
6. JSTL fn:trim() Function
The fn:trim() function removes the blank spaces from both the ends of a
string. It mainly used for ignoring the blank spaces from both the ends of
string.
Syntax
java.lang.String trim(java.lang.String)
Example
a. newjsp.jsp
Output
Jsp   session 11

More Related Content

PPTX
Jsp session 12
Anuj Singh Rajput
 
DOCX
Introduction to c programming
AMAN ANAND
 
PDF
Control structures functions and modules in python programming
Srinivas Narasegouda
 
PPTX
Amit user defined functions xi (2)
Arpit Meena
 
PDF
Introduction to Preprocessors
Thesis Scientist Private Limited
 
PDF
Introduction to Python
Mohammed Sikander
 
PDF
Php, mysq lpart3
Subhasis Nayak
 
PPTX
C language presentation
bainspreet
 
Jsp session 12
Anuj Singh Rajput
 
Introduction to c programming
AMAN ANAND
 
Control structures functions and modules in python programming
Srinivas Narasegouda
 
Amit user defined functions xi (2)
Arpit Meena
 
Introduction to Preprocessors
Thesis Scientist Private Limited
 
Introduction to Python
Mohammed Sikander
 
Php, mysq lpart3
Subhasis Nayak
 
C language presentation
bainspreet
 

What's hot (20)

PPT
Lecture 5
Mohammed Saleh
 
PPTX
Pointer basics
Mohammed Sikander
 
PPTX
Function
jasscheema
 
PPTX
Python Closures Explained | What are Closures in Python | Python Closures
Intellipaat
 
PDF
Anton Kasyanov, Introduction to Python, Lecture2
Anton Kasyanov
 
PDF
Linq & lambda overview C#.net
Dhairya Joshi
 
PPTX
Functions in python slide share
Devashish Kumar
 
PDF
Python functions
Prof. Dr. K. Adisesha
 
PPT
Md04 flow control
Rakesh Madugula
 
PPTX
Learning php 7
Ed Lomonaco
 
PPTX
Ifi7107 lesson4
Fernando Loizides
 
PDF
Function in C++
Prof Ansari
 
PPTX
Functions
Gaurav Subham
 
PPT
Python Built-in Functions and Use cases
Srajan Mor
 
PPTX
Introduction to golang
www.ixxo.io
 
DOC
What is storage class
Isha Aggarwal
 
PPTX
predefined and user defined functions
Swapnil Yadav
 
PPTX
Python Functions
Mohammed Sikander
 
PPT
user defined function
King Kavin Patel
 
PPT
Recursion in c
Saket Pathak
 
Lecture 5
Mohammed Saleh
 
Pointer basics
Mohammed Sikander
 
Function
jasscheema
 
Python Closures Explained | What are Closures in Python | Python Closures
Intellipaat
 
Anton Kasyanov, Introduction to Python, Lecture2
Anton Kasyanov
 
Linq & lambda overview C#.net
Dhairya Joshi
 
Functions in python slide share
Devashish Kumar
 
Python functions
Prof. Dr. K. Adisesha
 
Md04 flow control
Rakesh Madugula
 
Learning php 7
Ed Lomonaco
 
Ifi7107 lesson4
Fernando Loizides
 
Function in C++
Prof Ansari
 
Functions
Gaurav Subham
 
Python Built-in Functions and Use cases
Srajan Mor
 
Introduction to golang
www.ixxo.io
 
What is storage class
Isha Aggarwal
 
predefined and user defined functions
Swapnil Yadav
 
Python Functions
Mohammed Sikander
 
user defined function
King Kavin Patel
 
Recursion in c
Saket Pathak
 
Ad

Similar to Jsp session 11 (16)

KEY
Fall 2011 PHP Class - Session 2
jimbojsb
 
PPTX
Jsp tag library
sandeep54552
 
PPT
Scala functions
Knoldus Inc.
 
PPTX
Python Session - 4
AnirudhaGaikwad4
 
PDF
ppt python notes list tuple data types ope
SukhpreetSingh519414
 
PPTX
Java String
SATYAM SHRIVASTAV
 
PPTX
jstl ( jsp standard tag library )
Adarsh Patel
 
PDF
2-functions.pptx_20240619_085610_0000.pdf
amiyaratan18
 
PDF
functions- best.pdf
MikialeTesfamariam
 
PPTX
Introduction of flex
vip_du
 
PPTX
Tokens in php (php: Hypertext Preprocessor).pptx
BINJAD1
 
DOCX
String & path functions in vba
gondwe Ben
 
PPTX
Jsp session 13
Anuj Singh Rajput
 
PPTX
String, string builder, string buffer
SSN College of Engineering, Kalavakkam
 
PPTX
package
sweetysweety8
 
PPTX
stringstringbuilderstringbuffer-190830060142.pptx
ssuser99ca78
 
Fall 2011 PHP Class - Session 2
jimbojsb
 
Jsp tag library
sandeep54552
 
Scala functions
Knoldus Inc.
 
Python Session - 4
AnirudhaGaikwad4
 
ppt python notes list tuple data types ope
SukhpreetSingh519414
 
Java String
SATYAM SHRIVASTAV
 
jstl ( jsp standard tag library )
Adarsh Patel
 
2-functions.pptx_20240619_085610_0000.pdf
amiyaratan18
 
functions- best.pdf
MikialeTesfamariam
 
Introduction of flex
vip_du
 
Tokens in php (php: Hypertext Preprocessor).pptx
BINJAD1
 
String & path functions in vba
gondwe Ben
 
Jsp session 13
Anuj Singh Rajput
 
String, string builder, string buffer
SSN College of Engineering, Kalavakkam
 
package
sweetysweety8
 
stringstringbuilderstringbuffer-190830060142.pptx
ssuser99ca78
 
Ad

More from Anuj Singh Rajput (20)

PPTX
Web technology
Anuj Singh Rajput
 
PPTX
Java script
Anuj Singh Rajput
 
PPTX
Html (hypertext markup language)
Anuj Singh Rajput
 
PPTX
Bootstrap
Anuj Singh Rajput
 
PPTX
Jsp session 10
Anuj Singh Rajput
 
PPTX
Jsp session 9
Anuj Singh Rajput
 
PPTX
Jsp session 8
Anuj Singh Rajput
 
PPTX
Jsp session 7
Anuj Singh Rajput
 
PPTX
Jsp session 6
Anuj Singh Rajput
 
PPTX
Jsp session 5
Anuj Singh Rajput
 
PPTX
Jsp session 4
Anuj Singh Rajput
 
PPTX
Jsp session 3
Anuj Singh Rajput
 
PPTX
Jsp session 2
Anuj Singh Rajput
 
PPTX
Jsp session 1
Anuj Singh Rajput
 
PPTX
Servlet session 14
Anuj Singh Rajput
 
PPTX
Servlet session 13
Anuj Singh Rajput
 
PPTX
Servlet session 12
Anuj Singh Rajput
 
PPTX
Servlet session 11
Anuj Singh Rajput
 
PPTX
Servlet session 10
Anuj Singh Rajput
 
Web technology
Anuj Singh Rajput
 
Java script
Anuj Singh Rajput
 
Html (hypertext markup language)
Anuj Singh Rajput
 
Jsp session 10
Anuj Singh Rajput
 
Jsp session 9
Anuj Singh Rajput
 
Jsp session 8
Anuj Singh Rajput
 
Jsp session 7
Anuj Singh Rajput
 
Jsp session 6
Anuj Singh Rajput
 
Jsp session 5
Anuj Singh Rajput
 
Jsp session 4
Anuj Singh Rajput
 
Jsp session 3
Anuj Singh Rajput
 
Jsp session 2
Anuj Singh Rajput
 
Jsp session 1
Anuj Singh Rajput
 
Servlet session 14
Anuj Singh Rajput
 
Servlet session 13
Anuj Singh Rajput
 
Servlet session 12
Anuj Singh Rajput
 
Servlet session 11
Anuj Singh Rajput
 
Servlet session 10
Anuj Singh Rajput
 

Recently uploaded (20)

PDF
The Minister of Tourism, Culture and Creative Arts, Abla Dzifa Gomashie has e...
nservice241
 
PDF
Health-The-Ultimate-Treasure (1).pdf/8th class science curiosity /samyans edu...
Sandeep Swamy
 
PDF
Antianginal agents, Definition, Classification, MOA.pdf
Prerana Jadhav
 
PPTX
Dakar Framework Education For All- 2000(Act)
santoshmohalik1
 
PPTX
Virus sequence retrieval from NCBI database
yamunaK13
 
PDF
The-Invisible-Living-World-Beyond-Our-Naked-Eye chapter 2.pdf/8th science cur...
Sandeep Swamy
 
PPTX
An introduction to Dialogue writing.pptx
drsiddhantnagine
 
PPTX
Information Texts_Infographic on Forgetting Curve.pptx
Tata Sevilla
 
PPTX
An introduction to Prepositions for beginners.pptx
drsiddhantnagine
 
PPTX
Tips Management in Odoo 18 POS - Odoo Slides
Celine George
 
DOCX
Unit 5: Speech-language and swallowing disorders
JELLA VISHNU DURGA PRASAD
 
PDF
Module 2: Public Health History [Tutorial Slides]
JonathanHallett4
 
PPTX
Applications of matrices In Real Life_20250724_091307_0000.pptx
gehlotkrish03
 
DOCX
SAROCES Action-Plan FOR ARAL PROGRAM IN DEPED
Levenmartlacuna1
 
PPTX
Five Point Someone – Chetan Bhagat | Book Summary & Analysis by Bhupesh Kushwaha
Bhupesh Kushwaha
 
PPTX
How to Track Skills & Contracts Using Odoo 18 Employee
Celine George
 
PPTX
20250924 Navigating the Future: How to tell the difference between an emergen...
McGuinness Institute
 
PPTX
Care of patients with elImination deviation.pptx
AneetaSharma15
 
PDF
BÀI TẬP TEST BỔ TRỢ THEO TỪNG CHỦ ĐỀ CỦA TỪNG UNIT KÈM BÀI TẬP NGHE - TIẾNG A...
Nguyen Thanh Tu Collection
 
PPTX
Sonnet 130_ My Mistress’ Eyes Are Nothing Like the Sun By William Shakespear...
DhatriParmar
 
The Minister of Tourism, Culture and Creative Arts, Abla Dzifa Gomashie has e...
nservice241
 
Health-The-Ultimate-Treasure (1).pdf/8th class science curiosity /samyans edu...
Sandeep Swamy
 
Antianginal agents, Definition, Classification, MOA.pdf
Prerana Jadhav
 
Dakar Framework Education For All- 2000(Act)
santoshmohalik1
 
Virus sequence retrieval from NCBI database
yamunaK13
 
The-Invisible-Living-World-Beyond-Our-Naked-Eye chapter 2.pdf/8th science cur...
Sandeep Swamy
 
An introduction to Dialogue writing.pptx
drsiddhantnagine
 
Information Texts_Infographic on Forgetting Curve.pptx
Tata Sevilla
 
An introduction to Prepositions for beginners.pptx
drsiddhantnagine
 
Tips Management in Odoo 18 POS - Odoo Slides
Celine George
 
Unit 5: Speech-language and swallowing disorders
JELLA VISHNU DURGA PRASAD
 
Module 2: Public Health History [Tutorial Slides]
JonathanHallett4
 
Applications of matrices In Real Life_20250724_091307_0000.pptx
gehlotkrish03
 
SAROCES Action-Plan FOR ARAL PROGRAM IN DEPED
Levenmartlacuna1
 
Five Point Someone – Chetan Bhagat | Book Summary & Analysis by Bhupesh Kushwaha
Bhupesh Kushwaha
 
How to Track Skills & Contracts Using Odoo 18 Employee
Celine George
 
20250924 Navigating the Future: How to tell the difference between an emergen...
McGuinness Institute
 
Care of patients with elImination deviation.pptx
AneetaSharma15
 
BÀI TẬP TEST BỔ TRỢ THEO TỪNG CHỦ ĐỀ CỦA TỪNG UNIT KÈM BÀI TẬP NGHE - TIẾNG A...
Nguyen Thanh Tu Collection
 
Sonnet 130_ My Mistress’ Eyes Are Nothing Like the Sun By William Shakespear...
DhatriParmar
 

Jsp session 11

  • 1. SESSION – 11 By→ Anuj Kumar Singh
  • 2. JSTL Function Tags The JSTL function provides a number of standard functions, most of these functions are common string manipulation functions. The syntax used for including JSTL function library in your JSP is: <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
  • 3. JSTL Functions Description fn:contains() It is used to test if an input string containing the specified substring in a program. fn:containsIgnoreCase() It is used to test if an input string contains the specified substring as a case insensitive way. fn:endsWith() It is used to test if an input string ends with the specified suffix. fn:escapeXml() It escapes the characters that would be interpreted as XML markup. fn:indexOf() It returns an index within a string of first occurrence of a specified substring. fn:trim() It removes the blank spaces from both the ends of a string. fn:startsWith() It is used for checking whether the given string is started with a particular string value. fn:split() It splits the string into an array of substrings. fn:toLowerCase() It converts all the characters of a string to lower case. JSTL Function list
  • 4. fn:toUpperCase() It converts all the characters of a string to upper case. fn:substring() It returns the subset of a string according to the given start and end position. fn:substringAfter() It returns the subset of string after a specific substring. fn:substringBefore() It returns the subset of string before a specific substring. fn:length() It returns the number of characters inside a string, or the number of items in a collection. fn:replace() It replaces all the occurrence of a string with another string sequence. 1. JSTL fn:contains() Function The fn:contains() is used for testing if the string containing the specified substring. If the specified substring is found in the string, it returns true otherwise false. Syntax boolean contains(java.lang.String, java.lang.String)
  • 6. 2. JSTL fn:containsIgnoreCase() Function 1. The fn:containsIgnoreCase() function is used to test if an input string contains the specified substring as a case insensitive way. During searching the specified substring it ignores the case. 2. The syntax used for including the fn:containsIgnoreCase() function is: boolean containsIgnoreCase(java.lang.String, java.lang.String)
  • 8. 3. JSTL fn:endsWith() Function The fn:endsWith() function is used for testing if an input string ends with the specified suffix. If the string ends with a specified suffix, it returns true otherwise false. Syntax boolean endsWith(java.lang.String, java.lang.String)
  • 10. 4. JSTL fn:escapeXml() Function The fn:escapeXml() function escapes the characters that would be interpreted as XML markup. It is used for escaping the character in XML markup language. Syntax java.lang.String escapeXml(java.lang.String)
  • 12. 5. JSTL fn:indexOf() Function The fn:indexOf() function return an index of string. It is used for determining the index of string specified in substring. Syntax int indexOf(java.lang.String, java.lang.String)
  • 14. 6. JSTL fn:trim() Function The fn:trim() function removes the blank spaces from both the ends of a string. It mainly used for ignoring the blank spaces from both the ends of string. Syntax java.lang.String trim(java.lang.String)