Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JSP comment is called hide comment whereas html comment is called output comment

Tags:

People also ask

What is hidden comments in JSP?

Hidden Comment:A comments that documents the JSP page but is not sent to the client(it is not appear in output ). <%-- hidden comment --%>

What are JSP output comments?

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 --%>

What is difference between comment and comment in JSP?

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.