This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question and answer from j2eecertificate.

 
Trav Smith
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi folks

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

Thanks very much
JJ

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
Posts: 351
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

Regards,
Leena
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic