Session 10 : simple tags and tag file - Giáo trình Bách Khoa Aptech

1,395 views

Published on

Published in: Technology, Education
1 Comment
0 Likes
Statistics
Notes
  • Be the first to like this

No Downloads
Views
Total views
1,395
On SlideShare
0
From Embeds
0
Number of Embeds
566
Actions
Shares
0
Downloads
18
Comments
1
Likes
0
Embeds 0
No embeds

No notes for slide

Session 10 : simple tags and tag file - Giáo trình Bách Khoa Aptech

  1. 1. Slide 1 of 29 Simple Tag Tag file
  2. 2. Slide 2 of 29 Overview  Tag life cycle  Tag Library Descriptor  Execution of JSP with Custom Tags  Deploying & Using Custom Tags
  3. 3. Slide 3 of 29 Simple Custom Tag
  4. 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. 5. Slide 5 of 29 Simple Tag Interface  doTag()  setParent()  getParent()  setJspContext()  setJspBody()
  6. 6. Slide 6 of 29 SimpleTagSupport  getJspContext()  getJspBody()
  7. 7. Slide 7 of 29 Processing Body Content within Simple Tag
  8. 8. Slide 8 of 29 Tag File
  9. 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. 10. Slide 10 of 29 Tag File Directives  Tag  Include  Taglib  Attribute  Variable
  11. 11. Slide 11 of 29  <jsp:invoke />  <jsp:doBody/>
  12. 12. Slide 12 of 29 Differences Tag File & TLD
  13. 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

×