hi!
here is a tag-handler class. In
JSP API, it has been given that if the doStartTag() method returns EVAL_BODY_INCLUDE, then doInitBody() method will not be invoked. It will only be invoked if doStartTag() returns EVAL_BODY_BUFFERED. But in the given class, the doInitBody() method is invoked even the doStartTag() returns EVAL_BODY_INCLUDE. Please clear where i am wrong.
ashok.
_____________
package mytagdir;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import javax.servlet.jsp.tagext.*;
import java.io.*;
public class MyPage extends
BodyTagSupport {
public int doStartTag() throws JspException {
return EVAL_BODY_INCLUDE;
}
public void doInitBody() throws JspException {
System.out.println("initBody()");
}
public int doAfterBody() throws JspException {
return SKIP_BODY;
}
public int doEndTag() throws JspException {
return EVAL_PAGE;
}
}