Download presentation
Presentation is loading. Please wait.
Published byKimberly McDonald Modified over 8 years ago
1
Chapter 7 Using Custom Tag Libraries and the JSP Standard Tag Library
2
What Is a Custom Tag Library? Custom Actions Usage access to all information about the request add content to the response body as well as set response headers use any Java API to access external resources such as databases, email servers, etc.
3
Custom Tag Implementations Java Classes
4
Custom Tag Implementations Tag files (An example)
5
Custom Tag Implementations Custom Tag Library Tag Library Descriptor (TLD) JAR
6
Installing a Custom Tag Library place the JAR file for the library in the WEB-INF/lib directory for the web application
7
Declaring a Custom Tag Library Prefix use any prefix you like except jsp, jspx, java, javax, servlet, sun, or sunw Uri When the web application is started, the container scans through the WEB-INF directory structure for files with.tld extensions and all JAR files containing files with.tld extensions in their META-INF directory
8
Declaring a Custom Tag Library Relation between the taglib directive, the TLD, and the implementation (tag handler) for the custom actions
9
Identifying a Custom Tag Library in a JSP 1.1 Container WEB-INF/web.xml
10
Using Actions from a Tag Library
11
Setting Action Attribute Values Action attributes can be of any Java type Automatic type conversion
12
The JSP Standard Tag Library URI for the JSTL 1.1 libraries
13
JSTL functions
16
JSTL Reference Implementation JAR files
18
Using Beans or Custom Actions a bean is a great carrier of information a custom action is great for processing information Custom actions can use beans as input and output
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.