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

simple Tag <body-content>

 
Swathi Kota
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For a tag extending SimpleTagSupport can't we declare <body-content> as JSP? I am following HFSJ first edition and I haven't come acroos this.When i am doing whizlabs mock exams i found an explanation for a question that <body-content> for a simpel tag cannot be JSP.


Can somebody explain?

Thanks!
 
nisha chidella
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's given when they explained about JspFragment. It states:

The body of the tag that invokes a simple tag handler is encapsulated in the JspFragment object and then sendto tag handler in the setJspBody() method.

The thing to remember about JspFragment is that it cannot contain scripting elements.

so, since it cannot contain scripting elements, the body-content for a Simple Tag cannot be a JSP.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You'll find some information about the body content here.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic