Hi,
I have been trying to figure out why the following situation is arising in <body-content>empty</body-content>. If I provide the entry in tld then specifying a content in the body of the tag should give an exception, but it's working smoothly in my case. Please see the following snippets:
Code from the tld:
<tag>
<name>advice</name>
<tag-class>com.example.AdvisorTagHandler</tag-class>
<body-content>
empty</body-content>
<attribute>
<name>user</name>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
Code from the tag handler:
public void doTag() throws JspException, IOException{
getJspBody().invoke(null);
}
Code from the
jsp using tag:
<mine:advice>
Content should not print...
</mine:advice>
When I debug the tag handler, getJspBody() does not return null. I am using
Tomcat 6.0. Is it container specific property? Please help, this trivial issue has taken my lot of time.