Scripting Elements : In JSP every scripting element is written inside the <% %> tags. At the translation phase JSP engine reads the code inside the <% %> tags and processed it. In a JSP file outside this <% %> tag all code is treated as HTML or simple text.
JSP comments : At the time of creating the JSP page and you have some code where you want to add some comment then you can use JSP comment tags. At the time of translation phase the code inside the comment tag will be ignored. So the JSP comment is only for the jsp page. Following is the syntex of the JSP comment:
<%-- JSP comment --%>
Example of JSP comment : Following is the sample code to show the JSP comment on page.
<title>Simple JSP Page</title>
int counter = 0;
<%-- This is showing total number of users --%>
Total Users : <% out.println(++counter); %>