How to comment on jspx page

How to comment code on jspx page? I tried several methods,

<!--  -->
<%-- -->

but it does not work!

Therefore, I must:

<c:if test="${false}">code</c:if>,

it's really urgent, are there any other ways? Any help is appreciated!

+3
source share
4 answers

JSP.1.5.2 Comments in JSP docs

Comments in JSP documents use XML syntax ... The body of the content is completely ignored. [3]

CDATA sections may occur in any case where character data may occur; they are used to remove blocks of text containing characters that would otherwise be recognized as markup. [4]

+3

<!-- comment --> . JSPX XML, XML-.

JSP- JSP XML

+2

, JSP :

<%-- some commented out stuff --%>
0

XML IGNORE?

<![IGNORE[
  <!-- commented out XML -->
]]>

IGNORE INCLUDE, .

0

Source: https://habr.com/ru/post/1749559/


All Articles