|Summary:||no error on multiple close tags|
|Product:||Taglibs||Reporter:||Leo Mekenkamp <issues.apache.org>|
|Component:||Standard Taglib||Assignee:||Tomcat Developers Mailing List <dev>|
Description Leo Mekenkamp 2003-02-12 14:16:14 UTC
The following jsp runs without problems. Don't know how else to describe it other than: it should not run without errors/warnings. Apache Tomcat/4.1.18 1.4.1_01-b01 Sun Microsystems Inc. Linux 2.4.19-16mdkenterprise i386 8<--------8<--------8<-------8<-------- <%@taglib uri="http://java.sun.com/jstl/core" prefix="c"%> </c:if> </c:if> </c:if> </c:if> </c:if> </c:if>
Comment 1 Shawn Bayern 2003-02-12 14:52:34 UTC
The behavior is correct with respect to the JSP specification and is, in any case, beyond the scope of the JSTL implementation at Apache.
Comment 2 Leo Mekenkamp 2003-02-12 21:23:27 UTC
That might be true, but who does honestly think that the provided example is (or should be) 100% valid? I spend 1 hour on a bug only to find that it was caused by an 'if' tag that was mistakenly closed somewhere. Any modern programming environment that allows an 'endif' without an 'if' is a big step backwards in computer science if you ask me. I think this is not explicitly in the specs because noone saw a need for it. Imho if the supplied example _is_ allowed it should be specifically mentioned in the specs because it goes against all other 'if' behaviour in iterative languages. As there is no mention of this being allowed in the specs, one might be safe to assume 'normal' behaviour.
Comment 3 Serge Knystautas 2003-02-12 21:33:36 UTC
As Shawn said, this has nothing to do with the JSTL. Take any custom taglib, and Tomcat will do this. The issue is with Tomcat and specifically the Jasper JSP page compiler. They are following the JSP spec, but as you said, this can be frustrating. I know that Caucho's Resin servlet container will catch multiple close tags, if you're open to changing servlet engines.