Summary: | no error on multiple close tags | ||
---|---|---|---|
Product: | Taglibs | Reporter: | Leo Mekenkamp <issues.apache.org> |
Component: | Standard Taglib | Assignee: | Tomcat Developers Mailing List <dev> |
Status: | RESOLVED INVALID | ||
Severity: | major | ||
Priority: | P3 | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Hardware: | Other | ||
OS: | other |
Description
Leo Mekenkamp
2003-02-12 14:16:14 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. 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. 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. |