| Basic Taglib tld Tags | |
|---|---|
| tag | purpose |
| <?xml | Which version of XML (extensible Markup Language) is being used and which encoding. |
| <taglib | Miscellaneous information about where to find a DTD (Document Type Definition) to describe the xml grammar of the file |
| <description> | Surrounds some text documenting what this jsp-tag as whole is for. |
| <tag> | Surrounds tags describing one jsp tag. |
| <tag-class | qualified class name that implements javax.servlet.jsp.tagext. Tag to implement this jsp tag. |
| <teiclass | optional subclass ofjavax.servlet.jsp.tagext.TagExtraInfo . |
| <body-content | Can have the values empty, JSP, scriptless or tagdependent. A one-liner jsp tag would have an empty body. A jsp tag that surrounded some text would be set to JSP to evaluate the body of the tag. |
| <info> | Documenation on what this jsp tag is for. |
| <variable> | Surrounds tags describing one EL variable exposed to the calling page. |
| <attribute> | Surrounds tags describing one parameter of the jsp tag. |
| <name | Name of the keyword parameter used in the jsp files when the tag is invoked. Your handler will be passed the value of the parameter via its setXxx method where xxx matches the name of the keyword parameter. |
| <required | true if the parameter must be present. |
| <rtexprvalue | by default false. If true, the user may calculate this parameter’s value with a scriptlet. |
You must write getters and setters for each parameter, and aSimpleTagSupport.doTag orTagSupport.doStartTag method to generate the HTML from the parameter values.
Oddly, TagSupport has a completely different way of finding associated information. TagSupport has a protected field called pageContext. From there you can find the other control objects such as: JspWriter with getOut where you write the expanded HTML, Servlet with getPage, ServletRequest with getRequest, ServletResponse with getResponse, ServletConfig with getServletConfig and ServletContext with getServletContext.
Most of the navigation in convoluted, but straightforward. Getting the URL (Uniform Resource Locator) of the page you are generating is trickier:
|
|
You can get the freshest copy of this page from: | or possibly from your local J: drive (Java virtual drive/mindprod.com website mirror) |
| http://mindprod.com/jgloss/taglibs.html | J:\mindprod\jgloss\taglibs.html | |
![]() | ||
| Canadian Mind Products | ||
| mindprod.com IP:[65.110.21.43] | ||
| view Blog | Your face IP:[38.107.179.210] | |
| Feedback | You are visitor number 11,522. | |