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 )

What is JSP Scriptlet?

Tell me something about J2EE component?

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?

Interview Question: Is there a particularly good IDE to use with Struts ?

What are implicit Objects available to the JSP Page?

Interview Question: How does Struts work?

Interview Question: Do you have to credit Struts on your own website?

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

Explain the user defined Exceptions?

What is the difference between interface and abstract class?

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

Types of Interviews

What are the call back methods in Session bean?

How to define an Interface?

Interview Question: Why are some of the class and element names counter-intuitive?

Latest Articles (in Interview)