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

Question from Head First book chapter 10

 
Pawan Arora
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator



Assume that the tag has been properly configured to allow body content.

Which, if inserted at line 12, would cause the JSP code

<mytags:mytag>BodyContent</mytags:mytag> to ouput BodyContent?

A. return SKIP_BODY;

B. return EVAL_BODY_INCLUDE;

C. return EVAL_BODY_BUFFERED;

D. return BODY_CONTENT;


Answer: B

Why not B and C?

Thanks in advance.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The question is : Which would cause the JSP code <mytags:mytag>BodyContent</mytags:mytag> to ouput BodyContent?
Returning EVAL_BODY_BUFFERED will not cause it to output the content of the body, it will store it in a buffer, and you will be responsible for outputting its content.

I find this question a bit disturbing, because we could say that the body content is ouput in a buffer, but I think they mean "output in the web browser"...
 
Pawan Arora
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, it's cleared now.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic