tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dinesh, S." <din...@golisa.com>
Subject TAGLIB - Output doesn't seem to work
Date Thu, 22 Nov 2001 02:29:56 GMT
Hi All,

It's me again. My taglib doesn't seem to be writing out to the JSP Page.
Code follows.

Please kindly advice.

Thank you.


Dinesh, S.

----------------------------------------------------------------------------
----
package com.jcs.db.dbase;

import java.util.*;
import java.io.IOException;
import javax.servlet.jsp.*;

public class dBaseTag extends BodyTagSupport{
  private String _id        = null;
  private String _name      = null;

  public void setId(String id)

    _id=id;
    if (_name==null) _name=id;
  }
  public String getId()

    return _id;
  }
  public void setName(String name)

    _name=name;
    if (_id==null) _id=name;
  }
  public String getName()

    return _name;
  }

  public int doStartTag() throws JspTagException {
    try {
      pageContext.getOut().print("Start of the Hello.");
	 } catch (IOException e) {
	  throw new JspTagException("Fatal IOException!");
	}
    return EVAL_BODY_TAG;
  }
  public void doInitBody() throws JspException {}

  public int doAfterBody() throws JspTagException {
    try {
  	  JspWriter out = pageContext.getOut();
      out.println("End of the Hello");
	 } catch (IOException e) {
	  throw new JspTagException("Fatal IOException!");
	}
  }
  public int doEndTag() {
    return EVAL_BODY_TAG;
  }
  public void release() {
    _id    = null;
    _name  = null;
  }
}


--
To unsubscribe, e-mail:   <mailto:taglibs-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:taglibs-user-help@jakarta.apache.org>


Mime
View raw message