PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Wednesday, June 29, 2022

[FIXED] How can I correctly comment the JSTL code into a JSP to correctly exclude it from execution?

 June 29, 2022     comments, jsp, jstl     No comments   

Issue

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?


Solution

Here is the syntax for JSP comment:

<%-- Comment --%>

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


Answered By - Zeeshan
Answer Checked By - Clifford M. (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing