Home Tutorial Jsp JSPs : Comments

 
 

JSPs : Comments
Posted on: December 3, 2012 at 12:00 AM
Advertisement
This tutorial contains description of comments which is one of JSP page element.

JSPs : Comments

This tutorial contains description of comments which is one of JSP page element.

Comments :

Comments help in understanding what is actually code doing. JSPs provides two types of comments for putting comment in your page. First type of comment is for output comment which is appeared in the output stream on the browser. It is written by using the <!-- and --> tags.

Syntax -

 <!-- comment text -->

Second type of comment is not delivered to the browser. It is written by using the <%-- and --%> tags.

Syntax -

  <%-- comment text --%>

Example :

<html>
<head>
<title>JSP Comment Example</title>
</head>
<body>
There is two types of comment.
<%--This is first type comment--%>
<p><%="Hello World"%></p>
<!--This is another type comment-->
<p><%="Hello Roseindia"%></p>
</body>
</html>

Output :

Advertisement

Related Tags for JSPs : Comments:


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: December 3, 2012

Recommend the tutorial

Advertisements Advertisements
 

 

 

DMCA.com