aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Return value of doAfterBody Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Return value of doAfterBody" Watch "Return value of doAfterBody" New topic
Author

Return value of doAfterBody

Vipin Mohan
Ranch Hand

Joined: Nov 15, 2003
Posts: 79
hi

In Deshmukh's SCWCD exam Study Kit (page: 324), it specifies EVAL_BODY_BUFFERED as one of the return values of doAfterBody. I can't find this as a return value of this method in the specs or API. Is it a mistake or a change in the latest specs ?

Thanks
Vipin
Jacques Bosch
Ranch Hand

Joined: Dec 18, 2003
Posts: 319
Hi Vipin.

Only the BodyTag interface can return that value.


BodyTag interface
The BodyTag interface extends IterationTag by defining additional methods that let a tag handler manipulate the content of evaluating its body:

* The doStartTag() method can return SKIP_BODY, EVAL_BODY_INCLUDE, or EVAL_BODY_BUFFERED.

* If EVAL_BODY_INCLUDE or SKIP_BODY is returned, then evaluation happens as in IterationTag.

* If EVAL_BODY_BUFFERED is returned, setBodyContent() is invoked, doInitBody() is invoked, the body is evaluated, doAfterBody() is invoked, and then, after zero or more iterations, doEndTag() is invoked. The doAfterBody() element returns EVAL_BODY_AGAIN or EVAL_BODY_BUFFERED to continue evaluating the page and SKIP_BODY to stop the iteration.


Jacques<br />*******<br />MCP, SCJP, SCJD, SCWCD
Vipin Mohan
Ranch Hand

Joined: Nov 15, 2003
Posts: 79
hi Jacques

Can you tell me where I can find this line - "The doAfterBody() element returns EVAL_BODY_AGAIN or EVAL_BODY_BUFFERED to continue evaluating the page and SKIP_BODY to stop the iteration."
I just checked the APIs at http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/jsp/tagext/BodyTag.html
But I could not find this information.
Please advice,

Thanks
Vipin
Vipin Mohan
Ranch Hand

Joined: Nov 15, 2003
Posts: 79
hi guys

Can anyone help me with the above question ?

I have another question troubling me. I thought that request attributes are thread safe because the request object is scoped within the service method. But section SRV.2.3.3.3 in the specs state that the "Implementations of the request and response objects are not guaranteed to be thread
safe. This means that they should only be used within the scope of the request handling thread." How can they be used in any other threads ?
Are we talking about the threads started by the programmer from within the service method ? Can someone please explain ?

Thanks
Vipin
Jacques Bosch
Ranch Hand

Joined: Dec 18, 2003
Posts: 319

I just checked the APIs at http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/jsp/tagext/BodyTag.html
But I could not find this information.
Please advice,

You seem to be checking the 1.3 info. I think it was only added in 1.4. Check out the 1.4 specs.

Jacques
Vipin Mohan
Ranch Hand

Joined: Nov 15, 2003
Posts: 79
hi Jacques

I have checked the latest specs also, but there is no such information.
I would appreciate if you can send me a link where I can read this.

Thanks in advance
Vipin
Jacques Bosch
Ranch Hand

Joined: Dec 18, 2003
Posts: 319
Hi Vipin.
Perhaps this link will be of some help.:

http://www.jdiscuss.com/Enthuse/jsp/ViewPosts.jsp?forumid=26&topicid=635

J
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Return value of doAfterBody