Question: What is an output comment in JSP?

By: Guru Singh Printer Friendly Format    


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

 

 

 

 


Most Viewed Articles (in Interview )

Interview Question: Who makes the Struts?

Interview Question: How does Struts work?

Interview Question: Where can I get a copy of Struts?

Interview Question: What is EJB container?

Interview Question: What is Local client view in EJB?

Interview Question: Can I invoke Runtime.gc() in an EJB?

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

Interview Question: What are the call back methods in Entity bean?

Interview Question: What is abstract schema?

Interview Question: Is it possible to share an HttpSession between a JSP and EJB? What happens when I change a value in the HttpSession from inside an EJB?

Question: What is an Expression tag in JSP?

Question: What is an output comment in JSP?

Question: What is the directory structure of a web application?

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

What are the contents of web module?

Latest Articles (in Interview)

Comment on this tutorial