HTML description
Standard HTML comment. The JSP Container sends the comment to the client browser, but the comment is not displayed in the browser. You can view the comment by viewing the webpage source file.
Syntax
<! -- Comment [<% = expression>] -->
Attribute
Default Name Description
Comment without comments
Expression does not have an optional Java expression. The JSP Container evaluates the expression and sends the result as a comment to the client.
Example
<! -- HTML comment -->
<! -- The current date is <% = new java. util. Date () %> -->
Java annotations
Standard Java annotations can only be included in scriptlet. The container does not compile this part of the content; it will not be sent to the client browser.
Syntax
Syntax 1 single line comment
// Comment
Syntax 2 multi-line comment
/* Comment */
Attribute
Default Name Description
Comment without comments
Example
<%
/*
* Branch comments
*/
// Single line comment
%>
JSP comments
Description
JSP annotation. the JSP Container does not compile the annotation in this form or send it to the client browser.
Syntax
<% -- Comment -- %>
Attribute
Default Name Description
Comment without comments
Example
<% -- HTML comment -- %>