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 )

Explain garbage collection?

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

What is Collection API?

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

The output of System.out.println(5>>2) in Java

What do you understand by Synchronization?

Interview Question: Do ActionForms have to be true JavaBeans?

Interview Question: What is EJB container?

What is bean managed transaction?

What is the difference between JTS and JTA?

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

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

Interview Question: What is re-entrant. Is session beans reentrant. Is entity beans reentrant?

Interview Question: What is the difference between EAR, JAR and WAR file?

What are the services provided by a J2EE container?

Latest Articles (in Interview)