User Tools

Site Tools


jsp2

Table of Contents

Advanced JSP

This week exposes custom tags in JSP pages.

Outline

  • In addition to core, JSTL has many libraries whose coverage includes XML/XSL, Internationalization, Database access, Email, Regex, and Logging.
  • If JSTL does not have what is needed, create your own custom tag.
  • Three kinds of custom tags: utility-based tags, handler-based tags, and JSP-based tags.
  • The linkage between a tags and its target is done via the namespace, taglib.tld, and the tags directory.
  • Utility based tags are very simple to implement but are useful mainly for computation. This is because the static method has no access to the context's data structures.
  • Handler based tags are extremely powerful. They can access everything the servlet can access. The tag can have attributes as well as a body, and the Java method can access their contents.
  • JSP based tags are written in JSP and do not involve any Java. They are thus ideal when there is little logic but lots of presentation work.

To Do

  • Look at the labtest directory in the Resource Directory.
  • Look at CUSTdemo in the Resource Directory under jsp.
  • Read Chapter 6 up to and excluding Section 6.7.
  • Read Chapter 8, Section 8.6 and 8.7.
jsp2.txt · Last modified: 2008/11/03 13:32 by roumani