You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by "Dinesh, S." <di...@golisa.com> on 2001/11/22 03:29:56 UTC

TAGLIB - Output doesn't seem to work

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:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>