Hidden Comment:A comments that documents the JSP page but is not sent to the client(it is not appear in output ). <%-- hidden comment --%>
JSP comment marks text or statements that the JSP container should ignore. A JSP comment is useful when you want to hide or "comment out", a part of your JSP page. Following is the syntax of the JSP comments − <%-- This is JSP comment --%>
JSP comments are stripped out during the process of compiling the JSP. So, in short, JSP comments are stripped out by the JSP compiler and HTML comments are served to the browser.
I'm preparing for an interview so while reading some questions I found that the "JSP comment is called hide comment whereas html comment is called output comment". And the answer says that if we try to view source in JSP, the comments will not be shown whereas in HTML, it will be shown.
But I'm able to see the comment in the view source section. Can anybody clear this doubt?
Thanks in advance.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With