jsp2
This is an old revision of the document!
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 (leading to class mutators) as well as a body, and the method can access both.
- 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 underjsp
. - Read Chapter 6 up to and excluding Section 6.7.
- Read Chapter 8, Section 8.6 and 8.7.
jsp2.1225320180.txt.gz · Last modified: 2008/10/29 22:43 by roumani