Tag Library Introduction
by, 07-07-2012 at 06:51 PM (870 Views)
The programming language objects are created and accessed using action elements in Java Server Pages and the output stream is affected. There are 6 standard actions that are defined in the JSP specification and the JSP compliant implementation must provide these standards.
The custom actions which are reusable modules are also supported by the JSP technology in addition with standard actions. The custom tag in a JSP page is used to invoke the customer action. The custom tags collection makes a tag library.
Following are the examples of custom actions performed by different tasks:
• Accessing database
• Processing forms
• Directories and email processing
• Flow control
In absence of custom tags, java beans and scriplets were responsible for performing these tasks. Using java beans and scriplets, its hard to maintain the JSP page and it makes JSP page more complex.
Following are the features offered by the custom tags:
• It is possible to customize these custom tags using calling page attributes.
• The custom tags can access all JSP page objects.
• The custom tags can customize the calling page response.
• The custom tags can communicate with other tags.
• The custom tags support complex JSP page interaction using nested tags.