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.
Look:
<%-- Comment --%> - commenting out html
<% /*java code*/ %> - commenting out java code
<!-- comment --> - html comment, ignored by the browser
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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.