Chapter 1. Understanding JSP Custom Tags

printer-friendly version of this section  Print  e-mail this section  E-Mail  add a public, group or private note  Add Note  add a bookmark about this section  Add Bookmark    

JSTL: JSP Standard Tag Library Kick Start
By Jeff Heaton

Table of Contents


Chapter 1. Understanding JSP Custom Tags

JavaServer Pages Standard Tag Library (JSTL) is a standard tag library that can be used in JavaServer Pages (JSP). Sun introduced this exciting new technology to allow tag-based programming to exist more naturally with the already tag-based HTML. Because of this, Sun anticipates that JSTL will be an easier programming environment than the traditional scriptlet-based JSP programming. To understand JSTL, you must first understand what a tag library is.

Sun introduced JSTL as part of its Java Community Process (http://www.jcp.org/). Most Java Community Process technologies begin as a Java Specification Request (JSR). JSTL began as JSR-52 and JSR-152. JSTL has since been released as JSTL 1.0.

Tag libraries give the Java programmer the ability to write Java objects that will be executed as tags within the JSP code. Custom tags are interpreted by the Web server (or other servlet container) before they are transmitted to the Web browser. Tag libraries can output data of their own, as well as control the flow of HTML and scriptlet code in the JSP page. This allows content to be generated dynamically. Rather than always presenting the same content to the user, a JSP page dynamically creates pages to provide a more interactive experience for the user.

After tag libraries were introduced, many vendors began creating custom tag libraries that could be used with JSP. Many common uses for custom tags were discovered, such as data validation, internationalization, and program flow control. Each vendor implemented these "standard" functions differently.

JSTL is one of several programming methods for creating Web applications using Java. In addition to JSTL, the programmer can use custom tag libraries, scriptlet code, and regular HTML files. These methods are not mutually exclusive, and they can easily be used in conjunction with each other. This chapter presents an overview of these Java Web application technologies and how they fit together.

To help you better understand JSTL, let's step back and review each of the major technologies available to the JSP programmer.


    printer-friendly version of this section  Print  e-mail this section  E-Mail  add a public, group or private note  Add Note  add a bookmark about this section  Add Bookmark    
    Top

    [0672324504/ch01]

     
     


    JSTL. JSP Standard Tag Library Kick Start
    JSTL: JSP Standard Tag Library Kick Start
    ISBN: 0672324504
    EAN: 2147483647
    Year: 2001
    Pages: 93
    Authors: Jeff Heaton

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