Reputation: 51
I am currently working with JSP pages and would like to know what would be the easiest way to comment HTML/Java code from being able to see it when you open source on the web. As for now, I was used to use
<%-- html/Java code --%>
However, later on it screw up all highlighting of JSP file. Maybe there is another way of commenting multiple lines without possibility to see them in HTML source on web.
Upvotes: 1
Views: 556
Reputation: 3792
I would like to quote Oracle on this one: Code Convention
Please note the following (excerpt from the link):
Examples:
<% /** ... */ %>
<% /* ... */ %>
<% //... %>
<% //... %>
Let's note that these comments:
<!-- ... -->
ignore all elements except @import statements.
Upvotes: 0
Reputation: 11173
Look:
<%-- Comment --%> - commenting out html
<% /*java code*/ %> - commenting out java code
<!-- comment --> - html comment, ignored by the browser
Upvotes: 3