File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes about EVAL_BODY_BUFFERED problem? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "about EVAL_BODY_BUFFERED problem?" Watch "about EVAL_BODY_BUFFERED problem?" New topic
Author

about EVAL_BODY_BUFFERED problem?

dx wu
Ranch Hand

Joined: Apr 28, 2002
Posts: 60
which statement is true if the do Start Tag method returns EVAL_BODY_BUFFERED?
A.The tag handler must extend body Tag.
B.The do After Body method is NOT called.
C.The set Body Content method is called.
D.It is never legal to return EVAL_BODY_BUFFERED from do Start Tag.

Could someone help me? thanks in advance.


good good study , day day up!
Kejal Shah
Ranch Hand

Joined: Jun 27, 2003
Posts: 87
Is the answer A?


Kejal<br />SaneDevil@gmail.com
Bhumika Thakkar
Ranch Hand

Joined: Apr 18, 2005
Posts: 79
yup only BodyTag can return eval_body_buffered.


SCBCD (Preparing) <br />SCWCD, 82%<br />SCJP, 90%
Deepa Korecherla
Ranch Hand

Joined: Jul 14, 2004
Posts: 197
ans: A,C
if eval-body-buffered is called then setbodycontent(),doInitbody() r called before evaluating the body contents .


DKR<br />SCJP1.2,SCWCD1.4,SCBCD1.3,SCJA
Bhumika Thakkar
Ranch Hand

Joined: Apr 18, 2005
Posts: 79
IFF there is a body only then the setBodyContent will be called. In this case, we can't guarantee that setBodyContent will be called even though we return EVAL_BODY_BUFFERED.
HFS p634.
Deepa Korecherla
Ranch Hand

Joined: Jul 14, 2004
Posts: 197
hey bhumika!!!if there is no body u should never return eval-body-buff from the doStartTag() (see pg.534)
Deepa Korecherla
Ranch Hand

Joined: Jul 14, 2004
Posts: 197
i guess only C is correct b'coz u need to extend bodytagsupport not bodytag
what r the answers u get dx wu??
Bhumika Thakkar
Ranch Hand

Joined: Apr 18, 2005
Posts: 79
Deepa,

It says that if in tld we declare body-content to be empty then we must not return eval_body_include/buffered.

However, if body-content is not empty then we can return eval_body_include/buffered even if the body of our tag is empty.

Read the answer for that q carefully, its little complicated.
Deepa Korecherla
Ranch Hand

Joined: Jul 14, 2004
Posts: 197
I do agree!! but, hey! the thing in option A is not extend it should be implement or it can be extend btsupport not bt ...do u get it??
Bhumika Thakkar
Ranch Hand

Joined: Apr 18, 2005
Posts: 79
Yup, true! It should implement BodyTag or extend BodyTagSupport.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: about EVAL_BODY_BUFFERED problem?
 
Similar Threads
BodyTagSupport's return value EVAL_BODY_BUFFERED
doAfterBody()
One Tag Question
EVAL_BODY_BUFFERED
Chapter 10 Q#9