This week's book giveaway is in the Java 9 forum.
We're giving away four copies of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications and have Sander Mak & Paul Bakker on-line!
See this thread for details.
Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

what is the output?  RSS feed

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
public class TestTag extends BodyTagSupport{
public int doStartTag()throws JspException{
try{
JspWriter out=pageContext.getOut();
out.println("Customize");
}//try
catch(IOException ioex){}
return(EVAL_BODY_BUFFERED);
<prefix:tagname>
hello
</prefix:tagname>
 
George Pavamani
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess its going to be just:
Customize
The output is so because BodyContent is not explicitly written into the prevoius out stream in the doEnd() method like
this.getBodyContent.writeOut(pageContext.getOut()).
I am not sure about the answer and somebody please correct me if i am wrong.
Thanks in Advance
George
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!