Hi ,
When I tried to use flush() from custom tag class.It gives exception.
Here's my code
public class Welcome extends BodyTagSupport
{
public int doStartTag()
{
return EVAL_BODY_BUFFERED;
}
public int doAfterBody()
{
try
{
BodyContent bc = getBodyContent();
String str = bc.getString();
JspWriter out = pageContext.getOut();
System.out.println("Printing string before manipulation"+str);
str ="hello"+str;
out.println(str);
System.out.println("Printing string after manipulation"+str);
out.flush();
}
catch (Exception e)
{
e.printStackTrace();
}
return EVAL_BODY_INCLUDE;
}
}
why?
