Win a copy of OCP Java SE 8 Programmer II Exam Study Guide this week in the OCP forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Not able to get the bodycontent  RSS feed

 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using the BodyTagSupport and ......

I have all the other things right like

<bodycontent>JSP</bodycontent> in the tld file and

doStartTag() returns the EVAL_BODY_INCLUDE

I am also invoking the tag with the body but, I can't get the body content.

If I try using the getBodyContent() in the doEndTag() it returns null, I am not sure what is wrong.
 
Author and ninkuma
Marshal
Posts: 66532
160
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you implementing doAfterBody()?
 
Arun Kumar
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No I am not I am relying on the default return SKIP_BODY behaviour.
 
Arun Kumar
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sorry guys i found the problem

doStartTag() returns the EVAL_BODY_INCLUDE, that was the problem, I changed it to return EVAL_bODY_BUFFERED and it works now.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!