• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EVAL_BODY_BUFFERED

 
Jan Sterk
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
quote from an Enthuware answer:

At request time, the container validates the return value of the doStartTag() methods. In this case, since the Tag handler extends from TagSupport, it does not implement BodyTag interface and so it cannot return BodyTag.EVAL_BODY_BUFFERED from the doStartTag() method. This will cause a ServletException to be thrown from the JSP page.
However, the tag can be coded to return BodyTag.EVAL_BODY_BUFFERED without any compile time error because the compiler does not have any knowledge of what this tag is allowed to return.


But I tried this (returning EVAL_BODY_BUFFERED from a TagSupport class) with Tomcat, and no exception was thrown.
 
Charles Lyons
Author
Ranch Hand
Posts: 836
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In classic tags, I thought we cleared this up before It is the This will cause a ServletException to be thrown from the JSP page part of their explanation which is incorrect (in the case of Tomcat at least).
 
Jan Sterk
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm doing too much of those mocks lately. It's not good for my memory. I better take the real one soon

Thanks Charles.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic