Creating a Simple Tag
For your first step in creating a simple tag, you must write the tag handler class. Using the helper class, you should extend the abstract class TagSupport as shown in Listing 18.2, SummaryDisplayItem.java.
Listing 18.2. SummaryDisplayItem.java
package com.gams.ejbs.item; import java.io.*; import javax.servlet.jsp.*; import javax.servlet.jsp.tagext.*; import java.sql.Date; public class SummaryDisplayItem extends TagSupport { Next you must implement setters/getters, and the doStartTag() and doEndTag() methods as shown here. ItemValue[] itemArray = null; public SummaryDisplayItem() { } public void setItemArray(ItemValue[] iAr) { itemArray = iAr; System.out.println("SummaryDisplayItme:1-ParamConstructor: Item array set....."); ... |
Get BEA WebLogic Server™ 8.1 Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.