• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

what is the output?

 
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>
 
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
 
It's a tiny ad only because the water is so cold.
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic