November 2003
Intermediate to advanced
1488 pages
36h 35m
English
For your first step in creating a tag with a body, you must write the tag handler class. Using the helper class, you should extend the abstract class BodyTagSupport as shown in Listing 18.4 (DisplayItem.java).
package com.gams.ejbs.item;
import java.io.*;
import javax.servlet.jsp.*;
import javax.servlet.jsp.tagext.*;
import java.sql.Date;
public class DisplayItem extends BodyTagSupport
{
Next, you must implement setters/getters, and the methods doStartTag(), doAfterBody(), and doEndTag() as shown here: private ItemValue item = null; private BodyContent bodyContent = null; public DisplayItem() { } public void setItem(ItemValue iv) { item = iv; } public void setBodyContent(BodyContent ... |
Read now
Unlock full access