All of my tag library classes are in a pacage called taglib.
Here is one of my tag library classes if that helps..
package taglib;
import javax.servlet.jsp.tagext.TagSupport;
import javax.servlet.jsp.JspWriter;
import javax.servlet.jsp.JspException;
import java.io.IOException;
import HCCFIA.BusinessObjects.DataInterface;
import HCCFIA.BusinessObjects.User;
import HCCFIA.Utility.ListManager;
public class IsCheckedHandler extends TagSupport {
private
String listName;
private String type;
public void setListName(String ln)
{
this.listName = ln;
}
public void setType(String t)
{
this.type = t;
}
public int doStartTag() throws JspException
{
if (this.type == null)
{
this.type = "";
}
JspWriter out = pageContext.getOut();
ListManager lm = (ListManager)pageContext.getAttribute(listName,pageContext.REQUEST_SCOPE);
if (listName.compareTo("Subscription") == 0)
{
this.listName = "Committee";
}
DataInterface di = (DataInterface)pageContext.getAttribute("iterateOverObjects." + listName +".currentObject", pageContext.REQUEST_SCOPE);
String msg = di.getName();
try {
if (type.compareTo("ActiveUser") == 0)
{
User thisUser = (User)di;
if (thisUser.isActive())
{
out.print("CHECKED");
}
return SKIP_BODY;
} else if (type.compareTo("InActiveUser") == 0)
{
User thisUser = (User)di;
if (! thisUser.isActive())
{
out.print("CHECKED");
}
return SKIP_BODY;
}
} catch (IOException ioe)
{
throw new JspException(ioe.toString());
}
if (lm == null)
{
return SKIP_BODY;
}
if (lm.isMember(msg.trim()))
{
try
{
out.print("CHECKED");
} catch (IOException ioe)
{
throw new JspException(ioe.toString());
}
}
return SKIP_BODY;
}
}