• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

j2eeCertificate(custom tag ) ques

 
singh santosh
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,


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

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.

ans)4

shouldnt the ans be 2,4 ?

Please clarify...

regards
-santosh
 
wise owen
Ranch Hand
Posts: 2023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
check this one.
 
singh santosh
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi owen,
thnaks for redirecting me to that link .
But it doesnt have enough clues to answer my doubt .Let me clarify why i think 2 should also be the answer


in above code whent the control enters into the doStartTag() it checks for the totalTopics >40 which is false so the control goes to else block and the return would be SKIP_BODY.(This is how the 2 should also be in the answer).

Please clearify ....

regards
-santosh
 
joko mujoko
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think we have to look at Classic Tag life cycle. It will evaluate the body at least time, except your return value is SKIP PAGE.

Joko
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic