You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2003/03/06 15:21:16 UTC

DO NOT REPLY [Bug 17724] New: - HTML comments handled by Jasper incorrectly

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17724>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17724

HTML comments handled by Jasper incorrectly

           Summary: HTML comments handled by Jasper incorrectly
           Product: Tomcat 4
           Version: 4.1.18
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Servlet & JSP API
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: epesh@hotmail.com


According to the JSP spec (1.1, section 2.3 and 2.0, section 1.5.1), the
following code should not compile and run:

&lt;!-- &lt;% String foo="hello"; %&gt; --&gt;
&lt;%= foo %&gt;

Only JSP scriptlets are processed within HTML comments. It may be that the spec
is (and has been) in error here, as JSP does not generate ONLY HTML markup.
However, as it stands, the spec does not allow this code to compile. To wit,
here's the text from the spec:

"These comments are treated as uninterpreted template text by the JSP container.
If the generated comment is to have dynamic data, this can be obtained through
an expression syntax, as in:"

It then follows with the use of the jsp expression syntax.

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org