One of the most overlooked features of JSP is its ability to apply reusable code blocks--aka "tag libraries"-adding new functionality to a JSP application.
These tag libraries, declared using XML type tags, provide ready-made tools that can be easily consolidated into JSP pages. They are also a useful way to separate the business logic and visual appearance of an application.
There are many free online libraries-but how do you know where to start? The 10 JSP tag libraries listed in Table A provide a starting point for you to understand the availability of JSP. Now let's take a look at these 10 tag libraries.
Note: To install the JSP tag library, refer to the file information and installation instructions contained in each library.
Table A
Library Name Description
Standard This library is essential because it combines a large number of core improvements to common JSP. Some of its features include: XML manipulation libraries, SQL libraries, special internationalization features, and support for iterators and other program control mechanisms. Use this library when you need advanced process control structures, internationalization features, or XML support.
DateTime This library provides tools for various operational dates and times, including restoring the current date and time, generating date and month lists, formatting dates and times, and time zone conversions. Use this library to easily add date and time operations to your application.
Mailer This library is sent via a user-defined SMTP server to support email, adding e-mail to your JSP application. It also supports multiple-bit recipients, custom headers, MIME attachments, and error handling. Use this library when you need to create and send e-mail messages in a JSP page.
Cache This library provides a simple buffer framework for a Web site. It translates the buffered page to the client, allowing you to buffer part of the page and shorten the response time. If your site receives a lot of traffic, use this library to provide a page buffer snapshot instead of a "live" page from time to time, reducing server load and page processing times.
Xtages This library provider simplifies the process of parsing and transforming XML documents with XSLT. It can be used to apply an XSLT transformation to an XML document, add or remove XML nodes, evaluate XPath expressions, and define template rules. Use this library when you need advanced XML/XSLT processing functionality.
Regexp This library allows you to use regular expressions that are compatible with PERL5 in a JSP application. This library supports Perl's matching (m), replacement (s), and factorization operators. Use this library when you need pattern matching and alternate regular expression support.
JSP Controls This library allows you to create individual page components, such as login forms or progress bars, that can be updated individually. This library is particularly useful for AJAX applications, although it can also be used in non-Ajax mode. Use this library when building AJAX-type JSP applications.
Pagers This library implements a paging system for datasets, simplifying the process of moving back and forth through large datasets such as database search results. It also includes a variety of pagination styles that support the browsable results directory. Use this library when your application needs a rough paging system.
Jdbforms This library can establish links between database connections and form elements, creating custom actions to quickly simplify the development of database-driven Web applications. It also supports sorting, searching, filtering, and styling features, and uses a swing based interface. Use this library when you want to quickly develop a JSP application that is supported by your database.
Google Tag Library This gallery can perform and process Google searches, check spelling, and access pages in the Google.com cache. Use this library to add Google search functionality to your site or create a search engine that uses the Google.com database.