4. Slide 4 of 29
Simple Tag
– This JSP 2.0 technology in introduced simple
tag handler, which is an improvement over the
classic custom tag. It contains very less
number of methods to implement
• SimpleTag
• SimpleTagSupport
Slide 4of 14
5. Slide 5 of 29
Simple Tag Interface
doTag()
setParent()
getParent()
setJspContext()
setJspBody()
6. Slide 6 of 29
SimpleTagSupport
getJspContext()
getJspBody()
7. Slide 7 of 29
Processing Body Content within Simple Tag
9. Slide 9 of 29
Tag File
A tag file is a source file that contains a
fragment of JSP code that is reusable as a
custom tag. Tag files allow you to create
custom tags using JSP syntax. Just as a
JSP page gets translated into a servlet
class and then compiled, a tag file gets
translated into a tag handler and then
compiled.
10. Slide 10 of 29
Tag File Directives
Tag
Include
Taglib
Attribute
Variable
11. Slide 11 of 29
<jsp:invoke />
<jsp:doBody/>
13. Slide 13 of 29
Summary
Custom Tags
Various type of Custom Tags
Components of Tag Library
javax.servlet.jsp.tagext package
Common methods of Custom Tags
Tag life cycle
Tag Library Descriptor
Execution of JSP with Custom Tags
Deploying and Using Custom Tags