This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Can doAfterTag in TapSupport Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Can doAfterTag in TapSupport" Watch "Can doAfterTag in TapSupport" New topic
Author

Can doAfterTag in TapSupport

riohk kurn
Ranch Hand

Joined: Oct 19, 2002
Posts: 31
Hi,
As what I read mock exam:
public class body extends TagSupport {
public int doStartTag() throws JspException{
return EVAL_BODY_INCLUDE;
}
public int doAfterBody() throws JspException {
try { pageContext.getOut().print("how are you?"); }catch(IOException e) {}
return SKIP_BODY;
}
}
what will be printed out by the following part of a jsp page?
<prefix:sufix>
<i>Hello</i>
</prefix:sufix>
1) The tag handler won't compile.
2) The jsp page will print Hello how are you?
3) The jsp page will print how are you? Hello
4) The jsp page will print Hello
The answer is 4
you can't print from doAfterBdoy in a TagSupport handlers, is it true? Please help
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can doAfterTag in TapSupport
 
Similar Threads
printing from doAfterBody in tag handler
Mock test question
Help with the following ques
Custom Tag Handler
Taghandler doubt