https://issues.apache.org/bugzilla/show_bug.cgi?id=47977
Summary: body-content of empty in TLD ignored for JSP Documents Product: Tomcat 6 Version: 6.0.20 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Servlet & JSP API AssignedTo: dev@tomcat.apache.org ReportedBy: julian.cora...@gmail.com If <body-content>empty</body-content> is specified in the TLD, it is ignored for JSP Documents but not for JSP Pages (for JSP Pages the container correctly returns "According to TLD, tag <prefix>:<tag_name> be empty, but is not" Below are my test files: TestBodyContentEmptyBug.jspx: <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0" xmlns:jcc="TestBodyContentEmptyBug" > <jsp:directive.page contentType="text/html" /> <html> <head> </head> <body> <pre> <jsp:text>About to call TestBodyContentEmptyBug...</jsp:text> <jcc:TestBodyContentEmptyBug /> <jsp:text>Done calling TestBodyContentEmptyBug...</jsp:text> <hr/> <jsp:text>About to call TestBodyContentEmptyBug with a body...</jsp:text> <jcc:TestBodyContentEmptyBug > Hello from the body of TestBodyContentEmptyBug... this body should cause an error... should it not? </jcc:TestBodyContentEmptyBug > <jsp:text>Done calling TestBodyContentEmptyBug...</jsp:text> <hr/> </pre> </body> </html> </jsp:root> TestBodyContentEmptyBug.tld: <?xml version="1.0" encoding="ISO-8859-1" ?> <taglib xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd" version="2.0"> <tlib-version>2.0</tlib-version> <uri>TestBodyContentEmptyBug</uri> <tag> <description>This is the description TestBodyContentEmptyBug</description> <name>TestBodyContentEmptyBug</name> <tag-class>mypackage.TestBodyContentEmptyBug</tag-class> <body-content>empty</body-content> </tag> </taglib> TestBodyContentEmptyBug.java: package mypackage; import javax.servlet.jsp.PageContext; import javax.servlet.jsp.JspException; import javax.servlet.jsp.tagext.Tag; public class TestBodyContentEmptyBug implements Tag { private PageContext pageContext = null; private Tag parent = null; public void setPageContext(PageContext p) { pageContext = p; } public void setParent(Tag t) { parent = t; } public Tag getParent() { return parent; } public int doStartTag() throws JspException { return Tag.EVAL_BODY_INCLUDE; } public int doEndTag() throws JspException { return EVAL_PAGE; } public void release() { pageContext = null; parent = null; } } Filename web.xml: <web-app version="2.4"> <description>This is the optional description of the web-app1</description> </web-app> -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org