• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Question from Head First book chapter 10

 
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks, it's cleared now.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic