SlideShare uma empresa Scribd logo
1 de 22
O r g a n i za t i o n n a m e
Presented by
 Introduction to JSTL
 Categories
 JSTL Core
 JSTL Formatting
 JSTL SQL
 JSTL XML
 JSTL functions
Reference The Complete Reference JSP 2.0 by -Phil Hanna
2J S T L
• JSP Standard Tag Library(JSTL) is a standard
library of custom tags. The JSTL contain
several tag that can remove scriplet code from
a JSP page.
What is JSTL?
3J S T L
Conti..
• JSP Standard Tag Library (JSTL) is the standard
tag library that provides tags to control the JSP
page behavior, iteration and control statements,
internationalization tags, and SQL tags.
•To use JSTL the jar files like Jstl.jar , standard.jar
files are neccesary.
4J S T L
5 categories
• JSTL Core.
• JSTL Formatting.
• JSTL SQL.
• JSTL XML.
• JSTL functions.
5J S T L
JSTL core
• Core tags provide support for iteration, conditional
logic, catch exception, url, forward or redirect
response etc. To use JSTL core tags, we should
include it in the JSP page like below.
• <%@ taglib
uri="http://java.sun.com/jsp/jstl/co
re" prefix="c" %>
6J S T L
JSTL Formatting
• These tags are provided for formatting of Numbers,
Dates and i18n support through locales and resource
bundles. We can include these tags in JSP with below
syntax
• <%@ taglib
uri="http://java.sun.com/jsp/jstl/fm
t" prefix="fmt" %>
7J S T L
JSTL SQL
• JSTL SQL Tags provide support for interaction with
relational databases such as Oracle, MySQL etc.
Using SQL tags we can run database queries, we
include it in JSP with below syntax
• <%@ taglib
uri="http://java.sun.com/jsp/jstl/sq
l" prefix="sql" %>
8J S T L
JSTL XML
• XML tags are used to work with XML documents such
as parsing XML, transforming XML data and XPath
expressions evaluation. Syntax to include XML tags in
JSP page
• <%@ taglib
uri="http://java.sun.com/jsp/jstl/xm
l" prefix="x" %>
9J S T L
JSTL Functions
• JSTL tags provide a number of functions that we can
use to perform common operation, most of them are
for String manipulation such as String Concatenation,
Split String etc. Syntax to include JSTL functions in JSP
page
• <%@ taglib
uri="http://java.sun.com/jsp/jstl/fu
nctions" prefix="fn" %>
10J S T L
Library URI Prefix
Core http://java.sun.com/jsp/jstl/core c
XML Processing http://java.sun.com/jsp/jstl/xml x
Formatting http://java.sun.com/jsp/jstl/fmt fmt
Database Access http://java.sun.com/jsp/jstl/sql sql
Functions http://java.sun.com/jsp/jstl/functions fn
JSTL URIs and Default Prefixes
11J S T L
JSTL Core Tags
Tags Description
<c:out>
To write something in JSP page, we can use EL also with
this tag
<c:import> Same as <jsp:include> or include directive
<c:redirect> redirect request to another resource
<c:set> To set the variable value in given scope.
<c:remove> To remove the variable from given scope
<c:catch> To catch the exception and wrap it into an object.
<c:if>
Simple conditional logic, used with EL and we can use it
to process the exception from <c:catch>
<c:choose>
Simple conditional tag that establishes a context for
mutually exclusive conditional operations, marked by
<c:when> and <c:otherwise>
12J S T L
Core Tags Library
Tag Descriptor
<c:when>
Sub tags of <c:choose> that includes its body if its
condition evaluates to ‘true’.
<c:otherwise>
Sub tags of <c:choose> that includes its body if its
condition evaluates to ‘false’.
<c:forEach> for iteration over a collection
<c:forTokens> for iteration over tokens separated by a delimiter.
<c:param> used with <c:import> to pass parameters
<c:url>
to create a URL with optional query string
parameters
13J S T L
Format Tags
Tags Description
<fmt:formatNumber>
To render numerical value with specific
precision or format.
<fmt:parseNumber>
Parses the string representation of a
number, currency, or percentage.
<fmt:formatDate>
Formats a date and/or time using the
supplied styles and pattern
<fmt:parseDate>
Parses the string representation of a date
and/or time
<fmt:bundle>
Loads a resource bundle to be used by its
tag body.
<fmt:setLocale>
Stores the given locale in the locale
configuration variable.
14J S T L
Format Tags
Tags Description
<fmt:setBundle>
Loads a resource bundle and stores it in the
named scoped variable or the bundle
configuration variable.
<fmt:timeZone>
Specifies the time zone for any time
formatting or parsing actions nested in its
body.
<fmt:setTimeZone>
Stores the given time zone in the time zone
configuration variable
<fmt:message> To display an internationalized message.
<fmt:requestEncodin
g>
Sets the request character encoding
15J S T L
SQL Tags
Tags Description
<sql:setDataSource>
Creates a simple DataSource suitable only for
prototyping
<sql:query>
Executes the SQL query defined in its body or through
the sql attribute.
<sql:update>
Executes the SQL update defined in its body or
through the sql attribute.
<sql:param>
Sets a parameter in an SQL statement to the specified
value.
<sql:dateParam>
Sets a parameter in an SQL statement to the specified
java.util.Date value.
<sql:transaction >
Provides nested database action elements with a
shared Connection, set up to execute all statements
as one transaction.
16J S T L
XML tags
Tags Description
<x:parse>
Use to parse XML data specified either via an
attribute or in the tag body.
<x:set >
Sets a variable to the value of an XPath
expression.
<x:if >
Evaluates a test XPath expression and if it is
true, it processes its body. If the test
condition is false, the body is ignored.
<x:forEach> To loop over nodes in an XML document.
<x:choose>
Simple conditional tag that establishes a
context for mutually exclusive conditional
operations, marked by <when> and
<otherwise>
<x:when >
Subtag of <choose> that includes its body if
its expression evalutes to 'true'
17J S T L
XML Tags
Tag Descriptor
<x:otherwise >
Subtag of <choose> that follows <when>
tags and runs only if all of the prior
conditions evaluated to 'false'
<x:transform >
Applies an XSL transformation on a XML
document
<x:param >
Use along with the transform tag to set a
parameter in the XSLT stylesheet
18J S T L
Functions
Function Description
fn:contains()
Tests if an input string contains the specified
substring.
fn:containsIgnoreCase()
Tests if an input string contains the specified
substring in a case insensitive way.
fn:endsWith()
Tests if an input string ends with the specified
suffix.
fn:escapeXml()
Escapes characters that could be interpreted
as XML markup.
fn:indexOf()
Returns the index withing a string of the first
occurrence of a specified substring.
fn:join() Joins all elements of an array into a string.
19J S T L
Function Description
fn:replace()
Returns a string resulting from replacing in an
input string all occurrences with a given
string.
fn:split() Splits a string into an array of substrings.
fn:startsWith()
Tests if an input string starts with the
specified prefix.
fn:substring() Returns a subset of a string.
fn:substringAfter()
Returns a subset of a string following a
specific substring.
fn:substringBefore()
Returns a subset of a string before a specific
substring.
20J S T L
Tags Description
fn:toLowerCase()
Converts all of the characters of a string to
lower case.
fn:toUpperCase()
Converts all of the characters of a string to
upper case.
fn:trim()
Removes white spaces from both ends of a
string.
21J S T L
J S T L 22

Mais conteúdo relacionado

Mais procurados (20)

Xml parsers
Xml parsersXml parsers
Xml parsers
 
Event Handling in java
Event Handling in javaEvent Handling in java
Event Handling in java
 
Servlet and servlet life cycle
Servlet and servlet life cycleServlet and servlet life cycle
Servlet and servlet life cycle
 
PHP FUNCTIONS
PHP FUNCTIONSPHP FUNCTIONS
PHP FUNCTIONS
 
JavaScript - Chapter 11 - Events
 JavaScript - Chapter 11 - Events  JavaScript - Chapter 11 - Events
JavaScript - Chapter 11 - Events
 
Event handling
Event handlingEvent handling
Event handling
 
Ajax ppt
Ajax pptAjax ppt
Ajax ppt
 
4 internet programming
4 internet programming4 internet programming
4 internet programming
 
Ajax
AjaxAjax
Ajax
 
Ajax and Jquery
Ajax and JqueryAjax and Jquery
Ajax and Jquery
 
Hibernate Presentation
Hibernate  PresentationHibernate  Presentation
Hibernate Presentation
 
JQuery introduction
JQuery introductionJQuery introduction
JQuery introduction
 
Node.js Express Framework
Node.js Express FrameworkNode.js Express Framework
Node.js Express Framework
 
Introduction to JavaScript
Introduction to JavaScriptIntroduction to JavaScript
Introduction to JavaScript
 
A Basic Django Introduction
A Basic Django IntroductionA Basic Django Introduction
A Basic Django Introduction
 
Restful web services ppt
Restful web services pptRestful web services ppt
Restful web services ppt
 
jQuery for beginners
jQuery for beginnersjQuery for beginners
jQuery for beginners
 
Javascript validating form
Javascript validating formJavascript validating form
Javascript validating form
 
php
phpphp
php
 
java Servlet technology
java Servlet technologyjava Servlet technology
java Servlet technology
 

Destaque (20)

JSP Standart Tag Lİbrary - JSTL
JSP Standart Tag Lİbrary - JSTLJSP Standart Tag Lİbrary - JSTL
JSP Standart Tag Lİbrary - JSTL
 
JSP Standard Tag Library
JSP Standard Tag LibraryJSP Standard Tag Library
JSP Standard Tag Library
 
Basic JSTL
Basic JSTLBasic JSTL
Basic JSTL
 
Jdbc
JdbcJdbc
Jdbc
 
Jdbc
JdbcJdbc
Jdbc
 
MVC ppt presentation
MVC ppt presentationMVC ppt presentation
MVC ppt presentation
 
Model View Controller (MVC)
Model View Controller (MVC)Model View Controller (MVC)
Model View Controller (MVC)
 
Jdbc Ppt
Jdbc PptJdbc Ppt
Jdbc Ppt
 
Session 7 : jstl - Giáo trình Bách Khoa Aptech
Session 7 : jstl  - Giáo trình Bách Khoa AptechSession 7 : jstl  - Giáo trình Bách Khoa Aptech
Session 7 : jstl - Giáo trình Bách Khoa Aptech
 
DHTML
DHTMLDHTML
DHTML
 
Təhlükəsiz proqram təminatının java mühitində hazırlanma texnologiyaları
Təhlükəsiz proqram təminatının java mühitində hazırlanma texnologiyalarıTəhlükəsiz proqram təminatının java mühitində hazırlanma texnologiyaları
Təhlükəsiz proqram təminatının java mühitində hazırlanma texnologiyaları
 
Fişinqdən necə qorunmaq olar?
Fişinqdən necə qorunmaq olar?Fişinqdən necə qorunmaq olar?
Fişinqdən necə qorunmaq olar?
 
Java proqramlaşdirma mühitində təhlükəsiz proqram təminatinin hazirlanma texn...
Java proqramlaşdirma mühitində təhlükəsiz proqram təminatinin hazirlanma texn...Java proqramlaşdirma mühitində təhlükəsiz proqram təminatinin hazirlanma texn...
Java proqramlaşdirma mühitində təhlükəsiz proqram təminatinin hazirlanma texn...
 
Struts introduction
Struts introductionStruts introduction
Struts introduction
 
Xml
XmlXml
Xml
 
Operators and Expressions in Java
Operators and Expressions in JavaOperators and Expressions in Java
Operators and Expressions in Java
 
Dhtml
DhtmlDhtml
Dhtml
 
Introduction to Struts 1.3
Introduction to Struts 1.3Introduction to Struts 1.3
Introduction to Struts 1.3
 
java packages
java packagesjava packages
java packages
 
Dynamic HTML (DHTML)
Dynamic HTML (DHTML)Dynamic HTML (DHTML)
Dynamic HTML (DHTML)
 

Semelhante a jstl ( jsp standard tag library )

JSP Standard Tag Library
JSP Standard Tag LibraryJSP Standard Tag Library
JSP Standard Tag LibraryVISHAL DONGA
 
Jsp standard tag_library
Jsp standard tag_libraryJsp standard tag_library
Jsp standard tag_libraryKP Singh
 
5 xsl (formatting xml documents)
5   xsl (formatting xml documents)5   xsl (formatting xml documents)
5 xsl (formatting xml documents)gauravashq
 
Week 12 xml and xsl
Week 12 xml and xslWeek 12 xml and xsl
Week 12 xml and xslhapy
 
Implementing java server pages standard tag library v2
Implementing java server pages standard tag library v2Implementing java server pages standard tag library v2
Implementing java server pages standard tag library v2Soujanya V
 
XPath - XML Path Language
XPath - XML Path LanguageXPath - XML Path Language
XPath - XML Path Languageyht4ever
 
Implementing jsp tag extensions
Implementing jsp tag extensionsImplementing jsp tag extensions
Implementing jsp tag extensionsSoujanya V
 
eXtensible Markup Language (XML)
eXtensible Markup Language (XML)eXtensible Markup Language (XML)
eXtensible Markup Language (XML)Serhii Kartashov
 
Xslt by asfak mahamud
Xslt by asfak mahamudXslt by asfak mahamud
Xslt by asfak mahamudAsfak Mahamud
 

Semelhante a jstl ( jsp standard tag library ) (20)

JSP Standard Tag Library
JSP Standard Tag LibraryJSP Standard Tag Library
JSP Standard Tag Library
 
Jsp tag library
Jsp tag libraryJsp tag library
Jsp tag library
 
Session_15_JSTL.pdf
Session_15_JSTL.pdfSession_15_JSTL.pdf
Session_15_JSTL.pdf
 
Jsp standard tag_library
Jsp standard tag_libraryJsp standard tag_library
Jsp standard tag_library
 
5 xsl (formatting xml documents)
5   xsl (formatting xml documents)5   xsl (formatting xml documents)
5 xsl (formatting xml documents)
 
Jstl &amp; El
Jstl &amp; ElJstl &amp; El
Jstl &amp; El
 
Xml session
Xml sessionXml session
Xml session
 
Xml
XmlXml
Xml
 
Jsp session 9
Jsp   session 9Jsp   session 9
Jsp session 9
 
Week 12 xml and xsl
Week 12 xml and xslWeek 12 xml and xsl
Week 12 xml and xsl
 
Implementing java server pages standard tag library v2
Implementing java server pages standard tag library v2Implementing java server pages standard tag library v2
Implementing java server pages standard tag library v2
 
JSTL.pptx
JSTL.pptxJSTL.pptx
JSTL.pptx
 
Jsp session 13
Jsp   session 13Jsp   session 13
Jsp session 13
 
XPath - XML Path Language
XPath - XML Path LanguageXPath - XML Path Language
XPath - XML Path Language
 
Implementing jsp tag extensions
Implementing jsp tag extensionsImplementing jsp tag extensions
Implementing jsp tag extensions
 
XPATH_XSLT-1.pptx
XPATH_XSLT-1.pptxXPATH_XSLT-1.pptx
XPATH_XSLT-1.pptx
 
eXtensible Markup Language (XML)
eXtensible Markup Language (XML)eXtensible Markup Language (XML)
eXtensible Markup Language (XML)
 
Xslt by asfak mahamud
Xslt by asfak mahamudXslt by asfak mahamud
Xslt by asfak mahamud
 
Session 4
Session 4Session 4
Session 4
 
Xml and Co.
Xml and Co.Xml and Co.
Xml and Co.
 

Mais de Adarsh Patel

CMACs and MACS based on block ciphers, Digital signature
CMACs and MACS based on block ciphers, Digital signatureCMACs and MACS based on block ciphers, Digital signature
CMACs and MACS based on block ciphers, Digital signatureAdarsh Patel
 
Loaders ( system programming )
Loaders ( system programming ) Loaders ( system programming )
Loaders ( system programming ) Adarsh Patel
 
Non Linear Data Structures
Non Linear Data StructuresNon Linear Data Structures
Non Linear Data StructuresAdarsh Patel
 
8255:ppi & 8259:pic
8255:ppi & 8259:pic 8255:ppi & 8259:pic
8255:ppi & 8259:pic Adarsh Patel
 
case study of curve fitting
case study of curve fittingcase study of curve fitting
case study of curve fittingAdarsh Patel
 
basics of virtual memory
basics of virtual memorybasics of virtual memory
basics of virtual memoryAdarsh Patel
 
synchronous state machine design
synchronous state machine designsynchronous state machine design
synchronous state machine designAdarsh Patel
 
projection of solid
projection of solidprojection of solid
projection of solidAdarsh Patel
 
basic electronics, Transmission lines, wave guides And Antenna fundamental
basic electronics, Transmission lines, wave guides And Antenna fundamentalbasic electronics, Transmission lines, wave guides And Antenna fundamental
basic electronics, Transmission lines, wave guides And Antenna fundamentalAdarsh Patel
 
Radioactive pollution
Radioactive pollutionRadioactive pollution
Radioactive pollutionAdarsh Patel
 
Perfect Bookreview - you can win
Perfect Bookreview - you can winPerfect Bookreview - you can win
Perfect Bookreview - you can winAdarsh Patel
 
mechanical engineering transmission of motion and power
 mechanical engineering transmission of motion and power mechanical engineering transmission of motion and power
mechanical engineering transmission of motion and powerAdarsh Patel
 

Mais de Adarsh Patel (14)

CMACs and MACS based on block ciphers, Digital signature
CMACs and MACS based on block ciphers, Digital signatureCMACs and MACS based on block ciphers, Digital signature
CMACs and MACS based on block ciphers, Digital signature
 
4G 5G technology
4G 5G technology 4G 5G technology
4G 5G technology
 
Loaders ( system programming )
Loaders ( system programming ) Loaders ( system programming )
Loaders ( system programming )
 
Non Linear Data Structures
Non Linear Data StructuresNon Linear Data Structures
Non Linear Data Structures
 
8255:ppi & 8259:pic
8255:ppi & 8259:pic 8255:ppi & 8259:pic
8255:ppi & 8259:pic
 
case study of curve fitting
case study of curve fittingcase study of curve fitting
case study of curve fitting
 
basics of virtual memory
basics of virtual memorybasics of virtual memory
basics of virtual memory
 
synchronous state machine design
synchronous state machine designsynchronous state machine design
synchronous state machine design
 
projection of solid
projection of solidprojection of solid
projection of solid
 
basic electronics, Transmission lines, wave guides And Antenna fundamental
basic electronics, Transmission lines, wave guides And Antenna fundamentalbasic electronics, Transmission lines, wave guides And Antenna fundamental
basic electronics, Transmission lines, wave guides And Antenna fundamental
 
linear equations
linear equationslinear equations
linear equations
 
Radioactive pollution
Radioactive pollutionRadioactive pollution
Radioactive pollution
 
Perfect Bookreview - you can win
Perfect Bookreview - you can winPerfect Bookreview - you can win
Perfect Bookreview - you can win
 
mechanical engineering transmission of motion and power
 mechanical engineering transmission of motion and power mechanical engineering transmission of motion and power
mechanical engineering transmission of motion and power
 

Último

Zeeman Effect normal and Anomalous zeeman effect
Zeeman Effect normal and Anomalous zeeman effectZeeman Effect normal and Anomalous zeeman effect
Zeeman Effect normal and Anomalous zeeman effectPriyanshuRawat56
 
Résumé (2 pager - 12 ft standard syntax)
Résumé (2 pager -  12 ft standard syntax)Résumé (2 pager -  12 ft standard syntax)
Résumé (2 pager - 12 ft standard syntax)Soham Mondal
 
Call Girls Bidadi ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Call Girls Bidadi ☎ 7737669865☎ Book Your One night Stand (Bangalore)Call Girls Bidadi ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Call Girls Bidadi ☎ 7737669865☎ Book Your One night Stand (Bangalore)amitlee9823
 
Call Girls Bidadi Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Bidadi Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Bidadi Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Bidadi Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangaloreamitlee9823
 
Toxicokinetics studies.. (toxicokinetics evaluation in preclinical studies)
Toxicokinetics studies.. (toxicokinetics evaluation in preclinical studies)Toxicokinetics studies.. (toxicokinetics evaluation in preclinical studies)
Toxicokinetics studies.. (toxicokinetics evaluation in preclinical studies)sonalinghatmal
 
Vip Modals Call Girls (Delhi) Rohini 9711199171✔️ Full night Service for one...
Vip  Modals Call Girls (Delhi) Rohini 9711199171✔️ Full night Service for one...Vip  Modals Call Girls (Delhi) Rohini 9711199171✔️ Full night Service for one...
Vip Modals Call Girls (Delhi) Rohini 9711199171✔️ Full night Service for one...shivangimorya083
 
reStartEvents 5:9 DC metro & Beyond V-Career Fair Employer Directory.pdf
reStartEvents 5:9 DC metro & Beyond V-Career Fair Employer Directory.pdfreStartEvents 5:9 DC metro & Beyond V-Career Fair Employer Directory.pdf
reStartEvents 5:9 DC metro & Beyond V-Career Fair Employer Directory.pdfKen Fuller
 
Call Girls Hoodi Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hoodi Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Hoodi Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hoodi Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangaloreamitlee9823
 
Resumes, Cover Letters, and Applying Online
Resumes, Cover Letters, and Applying OnlineResumes, Cover Letters, and Applying Online
Resumes, Cover Letters, and Applying OnlineBruce Bennett
 
Motilal Oswal Gift City Fund PPT - Apr 2024.pptx
Motilal Oswal Gift City Fund PPT - Apr 2024.pptxMotilal Oswal Gift City Fund PPT - Apr 2024.pptx
Motilal Oswal Gift City Fund PPT - Apr 2024.pptxMaulikVasani1
 
Top Rated Pune Call Girls Warje ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Top Rated  Pune Call Girls Warje ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...Top Rated  Pune Call Girls Warje ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Top Rated Pune Call Girls Warje ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...Call Girls in Nagpur High Profile
 
TEST BANK For An Introduction to Brain and Behavior, 7th Edition by Bryan Kol...
TEST BANK For An Introduction to Brain and Behavior, 7th Edition by Bryan Kol...TEST BANK For An Introduction to Brain and Behavior, 7th Edition by Bryan Kol...
TEST BANK For An Introduction to Brain and Behavior, 7th Edition by Bryan Kol...rightmanforbloodline
 
Hyderabad 💫✅💃 24×7 BEST GENUINE PERSON LOW PRICE CALL GIRL SERVICE FULL SATIS...
Hyderabad 💫✅💃 24×7 BEST GENUINE PERSON LOW PRICE CALL GIRL SERVICE FULL SATIS...Hyderabad 💫✅💃 24×7 BEST GENUINE PERSON LOW PRICE CALL GIRL SERVICE FULL SATIS...
Hyderabad 💫✅💃 24×7 BEST GENUINE PERSON LOW PRICE CALL GIRL SERVICE FULL SATIS...sonalitrivedi431
 
Booking open Available Pune Call Girls Ambegaon Khurd 6297143586 Call Hot In...
Booking open Available Pune Call Girls Ambegaon Khurd  6297143586 Call Hot In...Booking open Available Pune Call Girls Ambegaon Khurd  6297143586 Call Hot In...
Booking open Available Pune Call Girls Ambegaon Khurd 6297143586 Call Hot In...Call Girls in Nagpur High Profile
 
Hot Call Girls |Delhi |Janakpuri ☎ 9711199171 Book Your One night Stand
Hot Call Girls |Delhi |Janakpuri ☎ 9711199171 Book Your One night StandHot Call Girls |Delhi |Janakpuri ☎ 9711199171 Book Your One night Stand
Hot Call Girls |Delhi |Janakpuri ☎ 9711199171 Book Your One night Standkumarajju5765
 
CALL ON ➥8923113531 🔝Call Girls Gosainganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Gosainganj Lucknow best sexual serviceCALL ON ➥8923113531 🔝Call Girls Gosainganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Gosainganj Lucknow best sexual serviceanilsa9823
 
Call Girls Jayanagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jayanagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...Call Girls Jayanagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jayanagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...amitlee9823
 
CALL ON ➥8923113531 🔝Call Girls Nishatganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Nishatganj Lucknow best sexual serviceCALL ON ➥8923113531 🔝Call Girls Nishatganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Nishatganj Lucknow best sexual serviceanilsa9823
 
Dombivli Call Girls, 9892124323, Kharghar Call Girls, chembur Call Girls, Vas...
Dombivli Call Girls, 9892124323, Kharghar Call Girls, chembur Call Girls, Vas...Dombivli Call Girls, 9892124323, Kharghar Call Girls, chembur Call Girls, Vas...
Dombivli Call Girls, 9892124323, Kharghar Call Girls, chembur Call Girls, Vas...Pooja Nehwal
 

Último (20)

Zeeman Effect normal and Anomalous zeeman effect
Zeeman Effect normal and Anomalous zeeman effectZeeman Effect normal and Anomalous zeeman effect
Zeeman Effect normal and Anomalous zeeman effect
 
Résumé (2 pager - 12 ft standard syntax)
Résumé (2 pager -  12 ft standard syntax)Résumé (2 pager -  12 ft standard syntax)
Résumé (2 pager - 12 ft standard syntax)
 
Call Girls Bidadi ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Call Girls Bidadi ☎ 7737669865☎ Book Your One night Stand (Bangalore)Call Girls Bidadi ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Call Girls Bidadi ☎ 7737669865☎ Book Your One night Stand (Bangalore)
 
Call Girls Bidadi Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Bidadi Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Bidadi Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Bidadi Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
 
Toxicokinetics studies.. (toxicokinetics evaluation in preclinical studies)
Toxicokinetics studies.. (toxicokinetics evaluation in preclinical studies)Toxicokinetics studies.. (toxicokinetics evaluation in preclinical studies)
Toxicokinetics studies.. (toxicokinetics evaluation in preclinical studies)
 
Vip Modals Call Girls (Delhi) Rohini 9711199171✔️ Full night Service for one...
Vip  Modals Call Girls (Delhi) Rohini 9711199171✔️ Full night Service for one...Vip  Modals Call Girls (Delhi) Rohini 9711199171✔️ Full night Service for one...
Vip Modals Call Girls (Delhi) Rohini 9711199171✔️ Full night Service for one...
 
reStartEvents 5:9 DC metro & Beyond V-Career Fair Employer Directory.pdf
reStartEvents 5:9 DC metro & Beyond V-Career Fair Employer Directory.pdfreStartEvents 5:9 DC metro & Beyond V-Career Fair Employer Directory.pdf
reStartEvents 5:9 DC metro & Beyond V-Career Fair Employer Directory.pdf
 
Call Girls Hoodi Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hoodi Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Hoodi Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hoodi Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
 
Resumes, Cover Letters, and Applying Online
Resumes, Cover Letters, and Applying OnlineResumes, Cover Letters, and Applying Online
Resumes, Cover Letters, and Applying Online
 
Motilal Oswal Gift City Fund PPT - Apr 2024.pptx
Motilal Oswal Gift City Fund PPT - Apr 2024.pptxMotilal Oswal Gift City Fund PPT - Apr 2024.pptx
Motilal Oswal Gift City Fund PPT - Apr 2024.pptx
 
Top Rated Pune Call Girls Warje ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Top Rated  Pune Call Girls Warje ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...Top Rated  Pune Call Girls Warje ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Top Rated Pune Call Girls Warje ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
 
TEST BANK For An Introduction to Brain and Behavior, 7th Edition by Bryan Kol...
TEST BANK For An Introduction to Brain and Behavior, 7th Edition by Bryan Kol...TEST BANK For An Introduction to Brain and Behavior, 7th Edition by Bryan Kol...
TEST BANK For An Introduction to Brain and Behavior, 7th Edition by Bryan Kol...
 
Hyderabad 💫✅💃 24×7 BEST GENUINE PERSON LOW PRICE CALL GIRL SERVICE FULL SATIS...
Hyderabad 💫✅💃 24×7 BEST GENUINE PERSON LOW PRICE CALL GIRL SERVICE FULL SATIS...Hyderabad 💫✅💃 24×7 BEST GENUINE PERSON LOW PRICE CALL GIRL SERVICE FULL SATIS...
Hyderabad 💫✅💃 24×7 BEST GENUINE PERSON LOW PRICE CALL GIRL SERVICE FULL SATIS...
 
Booking open Available Pune Call Girls Ambegaon Khurd 6297143586 Call Hot In...
Booking open Available Pune Call Girls Ambegaon Khurd  6297143586 Call Hot In...Booking open Available Pune Call Girls Ambegaon Khurd  6297143586 Call Hot In...
Booking open Available Pune Call Girls Ambegaon Khurd 6297143586 Call Hot In...
 
Hot Call Girls |Delhi |Janakpuri ☎ 9711199171 Book Your One night Stand
Hot Call Girls |Delhi |Janakpuri ☎ 9711199171 Book Your One night StandHot Call Girls |Delhi |Janakpuri ☎ 9711199171 Book Your One night Stand
Hot Call Girls |Delhi |Janakpuri ☎ 9711199171 Book Your One night Stand
 
CALL ON ➥8923113531 🔝Call Girls Gosainganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Gosainganj Lucknow best sexual serviceCALL ON ➥8923113531 🔝Call Girls Gosainganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Gosainganj Lucknow best sexual service
 
Call Girls Jayanagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jayanagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...Call Girls Jayanagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jayanagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
 
Sensual Moments: +91 9999965857 Independent Call Girls Paharganj Delhi {{ Mon...
Sensual Moments: +91 9999965857 Independent Call Girls Paharganj Delhi {{ Mon...Sensual Moments: +91 9999965857 Independent Call Girls Paharganj Delhi {{ Mon...
Sensual Moments: +91 9999965857 Independent Call Girls Paharganj Delhi {{ Mon...
 
CALL ON ➥8923113531 🔝Call Girls Nishatganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Nishatganj Lucknow best sexual serviceCALL ON ➥8923113531 🔝Call Girls Nishatganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Nishatganj Lucknow best sexual service
 
Dombivli Call Girls, 9892124323, Kharghar Call Girls, chembur Call Girls, Vas...
Dombivli Call Girls, 9892124323, Kharghar Call Girls, chembur Call Girls, Vas...Dombivli Call Girls, 9892124323, Kharghar Call Girls, chembur Call Girls, Vas...
Dombivli Call Girls, 9892124323, Kharghar Call Girls, chembur Call Girls, Vas...
 

jstl ( jsp standard tag library )

  • 1. O r g a n i za t i o n n a m e Presented by
  • 2.  Introduction to JSTL  Categories  JSTL Core  JSTL Formatting  JSTL SQL  JSTL XML  JSTL functions Reference The Complete Reference JSP 2.0 by -Phil Hanna 2J S T L
  • 3. • JSP Standard Tag Library(JSTL) is a standard library of custom tags. The JSTL contain several tag that can remove scriplet code from a JSP page. What is JSTL? 3J S T L
  • 4. Conti.. • JSP Standard Tag Library (JSTL) is the standard tag library that provides tags to control the JSP page behavior, iteration and control statements, internationalization tags, and SQL tags. •To use JSTL the jar files like Jstl.jar , standard.jar files are neccesary. 4J S T L
  • 5. 5 categories • JSTL Core. • JSTL Formatting. • JSTL SQL. • JSTL XML. • JSTL functions. 5J S T L
  • 6. JSTL core • Core tags provide support for iteration, conditional logic, catch exception, url, forward or redirect response etc. To use JSTL core tags, we should include it in the JSP page like below. • <%@ taglib uri="http://java.sun.com/jsp/jstl/co re" prefix="c" %> 6J S T L
  • 7. JSTL Formatting • These tags are provided for formatting of Numbers, Dates and i18n support through locales and resource bundles. We can include these tags in JSP with below syntax • <%@ taglib uri="http://java.sun.com/jsp/jstl/fm t" prefix="fmt" %> 7J S T L
  • 8. JSTL SQL • JSTL SQL Tags provide support for interaction with relational databases such as Oracle, MySQL etc. Using SQL tags we can run database queries, we include it in JSP with below syntax • <%@ taglib uri="http://java.sun.com/jsp/jstl/sq l" prefix="sql" %> 8J S T L
  • 9. JSTL XML • XML tags are used to work with XML documents such as parsing XML, transforming XML data and XPath expressions evaluation. Syntax to include XML tags in JSP page • <%@ taglib uri="http://java.sun.com/jsp/jstl/xm l" prefix="x" %> 9J S T L
  • 10. JSTL Functions • JSTL tags provide a number of functions that we can use to perform common operation, most of them are for String manipulation such as String Concatenation, Split String etc. Syntax to include JSTL functions in JSP page • <%@ taglib uri="http://java.sun.com/jsp/jstl/fu nctions" prefix="fn" %> 10J S T L
  • 11. Library URI Prefix Core http://java.sun.com/jsp/jstl/core c XML Processing http://java.sun.com/jsp/jstl/xml x Formatting http://java.sun.com/jsp/jstl/fmt fmt Database Access http://java.sun.com/jsp/jstl/sql sql Functions http://java.sun.com/jsp/jstl/functions fn JSTL URIs and Default Prefixes 11J S T L
  • 12. JSTL Core Tags Tags Description <c:out> To write something in JSP page, we can use EL also with this tag <c:import> Same as <jsp:include> or include directive <c:redirect> redirect request to another resource <c:set> To set the variable value in given scope. <c:remove> To remove the variable from given scope <c:catch> To catch the exception and wrap it into an object. <c:if> Simple conditional logic, used with EL and we can use it to process the exception from <c:catch> <c:choose> Simple conditional tag that establishes a context for mutually exclusive conditional operations, marked by <c:when> and <c:otherwise> 12J S T L
  • 13. Core Tags Library Tag Descriptor <c:when> Sub tags of <c:choose> that includes its body if its condition evaluates to ‘true’. <c:otherwise> Sub tags of <c:choose> that includes its body if its condition evaluates to ‘false’. <c:forEach> for iteration over a collection <c:forTokens> for iteration over tokens separated by a delimiter. <c:param> used with <c:import> to pass parameters <c:url> to create a URL with optional query string parameters 13J S T L
  • 14. Format Tags Tags Description <fmt:formatNumber> To render numerical value with specific precision or format. <fmt:parseNumber> Parses the string representation of a number, currency, or percentage. <fmt:formatDate> Formats a date and/or time using the supplied styles and pattern <fmt:parseDate> Parses the string representation of a date and/or time <fmt:bundle> Loads a resource bundle to be used by its tag body. <fmt:setLocale> Stores the given locale in the locale configuration variable. 14J S T L
  • 15. Format Tags Tags Description <fmt:setBundle> Loads a resource bundle and stores it in the named scoped variable or the bundle configuration variable. <fmt:timeZone> Specifies the time zone for any time formatting or parsing actions nested in its body. <fmt:setTimeZone> Stores the given time zone in the time zone configuration variable <fmt:message> To display an internationalized message. <fmt:requestEncodin g> Sets the request character encoding 15J S T L
  • 16. SQL Tags Tags Description <sql:setDataSource> Creates a simple DataSource suitable only for prototyping <sql:query> Executes the SQL query defined in its body or through the sql attribute. <sql:update> Executes the SQL update defined in its body or through the sql attribute. <sql:param> Sets a parameter in an SQL statement to the specified value. <sql:dateParam> Sets a parameter in an SQL statement to the specified java.util.Date value. <sql:transaction > Provides nested database action elements with a shared Connection, set up to execute all statements as one transaction. 16J S T L
  • 17. XML tags Tags Description <x:parse> Use to parse XML data specified either via an attribute or in the tag body. <x:set > Sets a variable to the value of an XPath expression. <x:if > Evaluates a test XPath expression and if it is true, it processes its body. If the test condition is false, the body is ignored. <x:forEach> To loop over nodes in an XML document. <x:choose> Simple conditional tag that establishes a context for mutually exclusive conditional operations, marked by <when> and <otherwise> <x:when > Subtag of <choose> that includes its body if its expression evalutes to 'true' 17J S T L
  • 18. XML Tags Tag Descriptor <x:otherwise > Subtag of <choose> that follows <when> tags and runs only if all of the prior conditions evaluated to 'false' <x:transform > Applies an XSL transformation on a XML document <x:param > Use along with the transform tag to set a parameter in the XSLT stylesheet 18J S T L
  • 19. Functions Function Description fn:contains() Tests if an input string contains the specified substring. fn:containsIgnoreCase() Tests if an input string contains the specified substring in a case insensitive way. fn:endsWith() Tests if an input string ends with the specified suffix. fn:escapeXml() Escapes characters that could be interpreted as XML markup. fn:indexOf() Returns the index withing a string of the first occurrence of a specified substring. fn:join() Joins all elements of an array into a string. 19J S T L
  • 20. Function Description fn:replace() Returns a string resulting from replacing in an input string all occurrences with a given string. fn:split() Splits a string into an array of substrings. fn:startsWith() Tests if an input string starts with the specified prefix. fn:substring() Returns a subset of a string. fn:substringAfter() Returns a subset of a string following a specific substring. fn:substringBefore() Returns a subset of a string before a specific substring. 20J S T L
  • 21. Tags Description fn:toLowerCase() Converts all of the characters of a string to lower case. fn:toUpperCase() Converts all of the characters of a string to upper case. fn:trim() Removes white spaces from both ends of a string. 21J S T L
  • 22. J S T L 22