Comments tags are used to insert comments in the source code. These comment tags are used to place some notification or remainders in the source code. Comments are not displayed on the browser, they only help in document your source code.
Comments are also helpful in debugging the code, because we can comment out the lines of code to search for errors.
There are three types of comments in JSP :
1) HTML comments :
Html comment syntax are also used in XML and JSP. We can use HTML comments in the JSP page by using the following syntax:
<!-- This is a comment -->
One thing notice that there is an exclamation (!) point in opening tag,but not in closing tag.
2) JSP Comments :
Jsp Comments are also known as Hidden Comments, because these comments are invisible when jsp page is translated into servlet internally. Syntax of using JSP comments are :
<%--This is a comment %>
3) Java Comments :
Java Comments are of two types i.e. first is single line comment and other is multiline comment. Java comments are only allowed in JSP scriptlet tag because java code can only insert into scriptlet tags.
Syntax of using single line comment :
// Single line comment
Syntax of using multiline line comment :
/*
Multiline comment
*/
Blog Author - Pushkar Khosla,
Software Developer by Profession with 3.0 Yrs of Experience , through this blog i'am sharing my industrial Java Knowledge to entire world. For any question or query any one can comment below or mail me at pushkar.itsitm52@gmail.com.
This blog is all about to learn Core Java ,Interview Programs and Coding tricks to polish your Java Knowledge. If you like the content of this blog please share this with your friends.
Software Developer by Profession with 3.0 Yrs of Experience , through this blog i'am sharing my industrial Java Knowledge to entire world. For any question or query any one can comment below or mail me at pushkar.itsitm52@gmail.com.
This blog is all about to learn Core Java ,Interview Programs and Coding tricks to polish your Java Knowledge. If you like the content of this blog please share this with your friends.
Java I/O Tutorial

No comments:
Post a Comment