Programming Tutorials

Question: What is a Hidden Comment in JSP?

By: Guru Singh in Interview Tutorials on 2008-08-24  

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

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

 

 

 

 





Add Comment

* Required information
1000

Comments

No comments yet. Be the first!

Most Viewed Articles (in Interview )

Interview Question: Is Struts compatible with other Java technologies?

Interview Question: What is deployment descriptor?

Explain the new Features of JDBC 2.0 Core API?

What is JAXP?

What is difference between Java Bean and Enterprise Java Bean?

What is the difference between jsp:include page and @ include file?

Why J2EE is suitable for the development of distributed multi-tiered enterprise applications?

What are all the different scope values for the tag?

Interview Question: What is the difference between Message Driven Beans and Stateless Session beans?

Interview Question: Write code of any Action Class?

Interview Question: What is difference between EJB 1.1 and EJB 2.0?

Question: How would you go about analyzing performance of an application?

Question: What is a Hidden Comment in JSP?

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

What is Collection API?

Latest Articles (in Interview)