IntelliJ Java IDE
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Custom tag life cycle Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Professional Certification » Web Component Certification (SCWCD/OCPJWCD)
Reply Bookmark "Custom tag life cycle" Watch "Custom tag life cycle" New topic
Author

Custom tag life cycle

Edy Yu
Ranch Hand

Joined: Nov 21, 2000
Posts: 264
Hi everyone:
I came accross the following words in JSP 1.2 Specification,
"If EVAL_BODY_INCLUDE is returned, setBodyContent() is not invoked,
doInitBody() is not invoked, the body is evaluated and �passed through� to the
current out, doAfterBody() is invoked and then, after zero or more iterations,
doEndTag() is invoked."
I have no problem with "setBodyContent() is not invoked". But I ran a test JSP with tag extends BodyTagSupport and I saw doInitBody() was called even though I asked doStartTag() to return EVAL_BODY_INCLUDE.
Was it a defect on JSP specification or I missed out something?
Thanks in advance.


<i><br />Sun Certified Programmer for Java 2 Platform (SCJP)<br />Sun Certified Developer for Java 2 Platform (SCJD)<br />Sun Certified Web Component Developer for Java2 Platform, Enterprise Edition (SCWCD)<br />Sun Certified Business Component Developer for Java2 Platform, Enterprise Edition (SCBCD)<br />Sun Certified Enterprise Architect for J2EE (SCEA)<br />IBM Certified Enterprise Developer, WebSphere Studio V5.0<br /></i>
Guy Allard
Ranch Hand

Joined: Nov 24, 2000
Posts: 776
Hi - Do a search in this forum for:
EVAL_BODY_BUFFERED
You will find a number of relevant threads.
Regards, Guy
 
IntelliJ Java IDE
 
subject: Custom tag life cycle
 
Threads others viewed
Custom tags and body processing
doInitBody()
Difference between EVAL_BODY_INCLUDE and EVAL_BODY_BUFFERED
BodyTag doubt
doStartTag MUST return SKIP_BODY