Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

doubts in CustomTags

 
naresh govindaswmay
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello <mylib:mytag> World!</mylib:mytag>

public class MyTag extends TagSupport

{

public int doAfterBody()

{

try

{

pageContext.getOut().println("In doAfterBody()");

}

catch(Exception e)

{

}

return SKIP_BODY;

}

}

Select 1 correct option.
A.Hello
B.Hello World!
C.Hello In doAfterBody() World!
D.Hello In doAfterBody()
E.None of the above.



hi,
I have selected d is the correct answer. But they said a is the corrct answer.Please clear this doubt.
 
Remko Strating
Ranch Hand
Posts: 893
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have not overridden the doStartTag() which default implementation returns SHIP_BODY. So the doAfterBody method is never evaluated.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
which default implementation returns SHIP_BODY

SKIP_BODY
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic