本文介绍了如何在jspx页面中发表评论的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在jspx页面中注释代码?我尝试了几种方法,
How to comment the code in jspx page? I have tried several methods,
<!-- -->
<%-- -->
但是它不起作用!
所以我必须:
<c:if test="${false}">code</c:if>,
真的很急,还有其他方法吗?感谢您的帮助!
it is really urgly, Is there any other ways?Any help is appreciated!
推荐答案
JSP.1.5.2 JSP文档中的注释
JSP文档中的注释使用XML语法...内容的主体将被完全忽略. [3]
Comments in JSP documents use the XML syntax...The body of the content is ignored completely. [3]
CDATA节可能出现在字符数据可能出现的任何地方;它们用于转义包含字符的文本块,否则这些字符将被视为标记. [4]
CDATA sections may occur anywhere character data may occur; they are used to escape blocks of text containing characters which would otherwise be recognized as markup. [4]
- java.sun.com/products/jsp/syntax/2.0/syntaxref203.html#1004313
- java.net/jira/browse/JSP_SPEC_PUBLIC-105
- http://jsp.java.net/spec/jsp- 2_1-fr-spec.pdf
- java.sun.com/products/jsp/syntax/2.0/syntaxref203.html#1004313
- java.net/jira/browse/JSP_SPEC_PUBLIC-105
- http://jsp.java.net/spec/jsp-2_1-fr-spec.pdf
http://www.w3.org/TR/REC-xml/#sec-cdata-sect
<![CDATA [<!-评论->]]>
<![CDATA[<!-- comment -->]]>
这篇关于如何在jspx页面中发表评论的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!