The Role of Tag Libraries

JSPs enable you to develop Web-based applications using Java without being a Java expert. By using well designed JavaBeans, it is possible to work almost entirely with HTML and JSP tags. However, as you saw in yesterday's work, you still have to use Java scriptlets to realize the full power of JSPs.

Tag Libraries extend the JSP philosophy further still so that it is possible for you to write most of your Web pages without using Java code.

This can utilized to good effect in development teams. By separating out the Java code into custom tags, a development team can utilize their individual skills more effectively. Java programmers are used to develop the business logic in custom tags, while HTML/JSP developers can focus on developing the presentation logic and look-and-feel of the Web pages.

Tag Libraries support custom JSP tags that can

  • Be customized by using attributes passed from the calling page

  • Access the objects available to JSP pages

  • Communicate with each other

  • Be used in a hierarchical manner to support complex features, such as iteration

Tag libraries were introduced with JSP 1.1 (1999) and the supporting Java classes were slightly revised in JSP 1.2 (2001). Since the introduction of JSPs the user community has quickly adopted them. Popular Web servers supporting Tag Libraries include the following:

  • Apache Jakarta (open source)

  • BEA Web Logic

  • IBM Web Sphere

  • iPlanet Applications Server

Most Web servers supporting JSP now include some standard Tag Libraries. However, these Tag Libraries are proprietary to each Web server, leading to Web applications that can only be deployed on a specific manufacturers server. In 2001, the Java Community Process (JCP) proposed a JSP Standard Tag Library (JSPTL) that, at the time of writing this book, was still being evaluated. The proposed standard library is discussed at the end of today's work and is available from the Apache Jakarta Project at http://jakarta.apache.org/taglibs.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.133.130.199