File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Question and answer from j2eecertificate. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Question and answer from j2eecertificate." Watch "Question and answer from j2eecertificate." New topic

Question and answer from j2eecertificate.

Trav Smith

Joined: Sep 24, 2003
Posts: 5
Hi folks

i am just wondering whether answer 2 should also be correct (as well as answer 4)

Thanks very much

Which of the following statements are true when the doStartTag() method is invoked? Consider that the start of the tag has been reached.

public class ForumTagHandler extends TagSupport { private int totalTopics = 0; public int doStartTag() throws JspException { if (totalTopics > 40) return EVAL_BODY_AGAIN; else return SKIP_BODY; }}

1 The body of the tag is evaluated again.
2 The body of the tag is skipped.
3 SKIP_BODY is not a valid return code.
4 EVAL_BODY_AGAIN is not a valid return code.
5 JspException is not handled in the doStartTag() method.
Leena Diwan
Ranch Hand

Joined: Jun 18, 2001
Posts: 351
How do u feel 2 is correct?

whether to evaluate the body or not is decided by the return type. If that is conditional, we cannot say that the body will get evaluated for sure.


I agree. Here's the link:
subject: Question and answer from j2eecertificate.
It's not a secret anymore!