Chapter 15. JSP Custom Tags

   

This chapter introduces custom tags. We start off looking at how to write a simple custom tag and deploy it. Then we'll see how you can use custom tags in your JavaServer Pages. We also will look at how you can import JSP tag libraries into ColdFusion MX templates for use in these applications.

In JavaServer Pages you can write your own tags as you can in Cold-Fusion. Like beans, JSP custom tags are regular Java classes; the chief distinguishing characteristic of these classes is that they extend one of a few API classes that support custom tag evaluation.

Writing custom JSP tags allows developers to distribute tag libraries, or collections of tags that have a uniform purpose or overarching theme. Tag libraries consist of one or more tags that have something in common. Sometimes the commonality is simply that they are from the same company. This is the case with the JRun tag library, which comes with Macromedia JRun. There are a number of tags in this library that make it very easy to work with JRun. These tags include some for querying databases, working with XML, and performing iterative loops .

The introduction of the JavaServer Pages Standard Tag Library by the Apache Software Foundation marks a new stage in JSP development. The standard tag library, which we will look at in this chapter, consists of many different tags, including those for iteration and logic, database access, internationalization, and formatting.


   
Top


Java for ColdFusion Developers
Java for ColdFusion Developers
ISBN: 0130461806
EAN: 2147483647
Year: 2005
Pages: 206
Authors: Eben Hewitt

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net