PrakashVarma
asked on
My understanding regarding custom tags
Hi Friends,
The doAfterBody method(in TagSupport class) is called after the body content is evaluated it means for the first time body content is evaluated by doStartTag method after that it is evaluated by doAfterBody method,right?and what is the difference between doAfterBody method in TagSupport class and BodyTagSupport class?
The doAfterBody method(in TagSupport class) is called after the body content is evaluated it means for the first time body content is evaluated by doStartTag method after that it is evaluated by doAfterBody method,right?and what is the difference between doAfterBody method in TagSupport class and BodyTagSupport class?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
public int doAfterBody() throws JspException {
// do something, or nothing
return SKIP_BODY;
}Sometimes the tag handler class must continually process the body content of a custom tag in a loop. You can tell the JSP container to repeatedly evaluate the body content and doAfterBody() invocation by returning EVAL_BODY_TAG from doAfterBody(). Note that because processing can change the body content or its context, each body content evaluation can have differing results.
public int doAfterBody() throws JspException {
//do something, or nothing
return EVAL_BODY_TAG;
}
check these links that may help you.
http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/JSPTags6.html
http://java.boot.by/wcd-guide/ch10.html
http://www.examulator.com/moodle/mod/resource/view.php?id=470