Question: What is a Hidden Comment in JSP?

By: Guru Singh Printer Friendly Format    

Question: What is a Hidden Comment in JSP?

Answer:  A comment that documents the JSP page but is not sent to the client. The JSP engine ignores a hidden comment, and does not process any code within hidden comment tags. A hidden comment is not sent to the client, either in the displayed JSP page or the HTML page source. The hidden comment is useful when you want to hide or "comment out" part of your JSP page.

You can use any characters in the body of the comment except the closing --%> combination. If you need to use --%> in your comment, you can escape it by typing --%\>.
JSP Syntax
<%-- comment --%>

<%@ page language="java" %>
<head><title>A Hidden Comment </title></head>
<%-- This comment will not be visible to the colent in the page source --%>





Most Viewed Articles (in Interview )

Interview Question: What are the optional clauses in EJB QL?

Question: Explain the life-cycle methods in JSP?

Name the containers which uses Border Layout as their default layout?

What is the difference between jsp:forward and response.sendRedirect(url),?.

Interview Question: What is Struts Validator Framework?

Interview Question: If the framework doesn't do what I want, can I request that a feature be added?

Interview Question: Do ActionForms have to be true JavaBeans?

Interview Question: What is Local client view in EJB?

What are the contents of web module?

Differentiate between .ear, .jar and .war files.

What is transient variable?

What is Collection API?

What is similarities/difference between an Abstract class and Interface?

How to define an Abstract class?

What are Access Specifiers available in Java?

Latest Articles (in Interview)

Comment on this tutorial