• 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

info on BodyTagSupport

 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi All,

i need clarification on ques9 page 553 of HFSJ.

public class BufTag extends BodyTagSupport{
public int doStartTag() throws JspException{
//insert code here
}
}

Assume that the tag is properly configured to allow the body content. which , if inserted at commented line would cause the JSP code <myTags:mytag>BodyContent</myTags:mytag> to output BodyContent

Answer is B. EVAL_BODY_INCLUDE

why not EVAL_BODY_INCLUDE and EVAL_BODY_BUFFERED??
 
Abhishek Pratap
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Anybody reply....
 
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
Returning EVAL_BODY_BUFFERED will make everything go to a buffer. So unless you output the buffer itself, nothing will be printed. You could also try to make two tags and see how they differ. One returning EVAL_BODY_INCLUDE, and one returning EVAL_BODY_BUFFERED.
 
This is awkward. I've grown a second evil head. I'm going to need a machete and a tiny ad ...
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic