1

I am working on a JSP page.

I have noticed that if I want to exclude that this test is performed:

<!--<c:if test="${progetto.twp1009Tipostaprogetto.codTipSta==5}">-->
    SHOW SOME HTML ELEMENTS
<!--</c:if>-->

The use of the HTML comments on the <c:if> tag don't works and the test still be performed.

Why? What am I missing? How can I correctly comment this JSTL test to exclude it and avoid that it is performed?

halfer
  • 19,824
  • 17
  • 99
  • 186
AndreaNobili
  • 40,955
  • 107
  • 324
  • 596
  • Possible duplicate of [How comment a JSP expression?](http://stackoverflow.com/questions/220243/how-comment-a-jsp-expression) – Predrag Maric Jan 04 '16 at 15:13

1 Answers1

2

Here is the syntax for JSP comment:

<%-- Comment --%>

<%--<c:if test="${progetto.twp1009Tipostaprogetto.codTipSta==5}">--%>
    SHOW SOME HTML ELEMENTS
<%--</c:if>--%>
Zeeshan
  • 11,851
  • 21
  • 73
  • 98