JSP reference (2) Comment element [comment]

Source: Internet
Author: User
Tags html comment
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 -- %>
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.