Q1: | What are three features of custom tags that I can use to extend my Web pages? |
A1: | Custom tags can access objects (such as HTTP request parameters and the page context) of the JSP page. They can cooperate and share information with each other and can be used in a hierarchical manner to implement programmable concepts, such as iteration. |
Q2: | What is the name of the Java package that supports the development of custom tags, and what are the two classes that are normally extended by custom tags? |
A2: | The custom tag package is javax.servlet.jsp.tagext, and the two super classes used for most tags are TagSupport and BodyTagSupport. |
Q3: | What are the five methods I can override when extending BodyTagSupport, including parameters and return type? In what order are these methods call when processing the custom tag? |
A3: | The BodyTagSupport methods in execution order are
|
Q4: | What does TLD stand for and what is it used for? |
A4: | TLD is the Tag Library Descriptor, and it is an XML document that defines the Tag Library. The TLD is used to define the library name and version of the JSP specification to which your tags conform. It also lists every tag in your library. |
Q5: | What are the five XML components that are used in the custom tag <tag> entry in the TLD? |
A5: | The most common tags used in the <tag> entry in a TLD are |
18.219.4.174