




|
Creating JSP Tag Libraries
What are JSP Taglibs?
Java Server Page (JSP) 1.1 specification introduced the
concept of tag libraries. This allow for the creation of custom tags, that
can in turn be used by JSPs.
Tag libraries provide the following benefits:
- Better separation of JSP code from HTML code (thereby making it easier for page designers/developer to work with HTML code)
- Better reuse of JSP code between HTML pages
This course will teach how to build and install your own custom tag libraries. Through a combination of lecture and labs, you'll learn
the custom tag API and architecture. You'll learn how to process and manipulate JSP content.
What will I learn?
- Introduction to Custom Tags
- value/goals of custom tags
- architectural overview
- taglib directive
- tld (XML tag library descriptor file)
- Creating handlers and processing Simple Tags
- Tag interface
- TagHandler, TagSupport, and PageContext Classes
- lifecycle
- doStart()
- attributes
- scope, TagExtraInfo class
- Processing More Complex Tags
- Body content (between start and end tags).
- Tags that modify body content
- Looping and nesting tags
- Interface BodyTag, classes BodyContent and BodyTagSupport
- doStartTag(), doIniitBody(), setBodyContent(), doAfterBody(), doEndTag()
- lifecycle
- Advanced Topics / Future Developments
Specifications
- Duration (total): 1 day
- Duration of Exercises: .5 days
- Duration of Lecture: .5 days
Pre-requisites
If you are building a custom course, you will need to cover these topics before this topic can be presented:
In addition, material covered in this section requires attendees to know the following:
- Basic Java knowledge including exception handling, threads,
full use of all the language constructs, and familiarity with the core Java APIs.
-
Those without these pre-requisites should consider one of
our Ultimate Java Programming Workshops.
A table of contents of this module is available upon request.
Return to the Custom Order Page.
Copyright ©2007 by Petronio Technology Group, Inc. All
rights reserved. Petronio, "Targeted Technology Training", "T3"
and "Turning new technologies into your competitive advantage"
are trademarks of Petronio Technology Group. All other trademarks are the
properties of their respective companies.
|