Question: What is an output comment in JSP?

By: Guru Singh  

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

 

 

 

 


Archived Comments

1. Write Five operators used in Expression Language
View Tutorial          By: safia at 2011-02-20 08:29:11


Most Viewed Articles (in Interview )

Interview Question: How do I install Struts?

Interview Question: What is the difference between find and select methods in EJB?

What is the difference between interface and abstract class?

What do you understand by JTA and JTS?

What are types of J2EE clients?

What is the difference between Session Bean and Entity Bean?

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

What are the call back methods in Session bean?

Interview Question: What is Message Driven Bean?

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

Interview Question: What is lazy loading?

Interview Question: Why does EJB needs two interfaces(Home and Remote Interface)?

Interview Question: What about JSTL and JavaServer Faces ?

What types of comments are available in the JSP?

What is expression in JSP?

Latest Articles (in Interview)

Comment on this tutorial