posted 15 years ago
If you look closely at the specification JSP.13.1 Classic Tag Handlers, you'll see many times the following :
If the TagLibraryDescriptor file indicates that the action must always have an empty element body, by a <body-content> entry of "empty", then the doStartTag() method must return SKIP_BODY.
JSP.13.2.2 BodyTag also says :
If EVAL_BODY_INCLUDE is returned, and the custom action element is not empty, setBodyContent() is not invoked, doInitBody() is not invoked, the body is evaluated and "passed through" to the current out, doAfterBody() is invoked and then, after zero or more iterations, doEndTag() is invoked. If the custom action element is empty, only doStart() and doEndTag() are invoked.
So, I think the container should generate an error if doStartTag() does not return SKIP_BODY when body-content is set to empty. However, it should be ok when an empty body is used with a body-content set to something different than "empty". I'd like to say that it's a container issue, but I'm not 100% sure.