Programming Tutorials

Question: What is an output comment in JSP?

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

Question: What is an output comment in JSP?

Answer:  A comment that is sent to the client in the viewable page source.The JSP engine handles an output comment as uninterpreted HTML text, returning the comment in the HTML output sent to the client. You can see the comment by viewing the page source from your Web browser.

JSP Syntax
<!-- comment [ <%= expression %> ] -->

Example 1

<!-- This is a commnet sent to client on
<%= (new java.util.Date()).toLocaleString() %>
-->

Displays in the page source:
<!-- This is a commnet sent to client on January 24, 2004 -->

 

 

 

 





Add Comment

* Required information
1000

Comments

No comments yet. Be the first!

Most Viewed Articles (in Interview )

Interview Question: What is the difference between sessioncontext and entitycontext?

What is the difference between Session Bean and Entity Bean?

Tell me something about J2EE component?

Interview Question: How is the MVC design pattern used in Struts framework?

How to define an Abstract class?

What are the services provided by a J2EE container?

Question: What is an output comment in JSP?

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

What is the difference between interface and abstract class?

What are types of J2EE clients?

Question: What is a Hidden Comment in JSP?

Question: What is an Expression tag in JSP?

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

Interview Question: Do ActionForms have to be true JavaBeans?

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

Latest Articles (in Interview)