JSP Comment method

Source: Internet
Author: User
Tags html comment

Comment method for 1,html

<!--... add your comments here...-->


Description: Use this annotation method, where the comment content is invisible in client browsing. However, when viewing the source code, the customer is
You can see these comment content

2,jsp Comment Tags


The JSP also provides its own markup for comments, which are used in the following format:
<%--
Add your comments here
--%>
Description: The content of this annotation method is not visible in the client source code, so security is relatively high.

Using annotations in 3,jsp scripts
As already described, the script is the program code embedded between the <% and%> tags, and the script uses the language for Java, the
The comments in the script are the same as the annotation methods in the Java class. You can use "//" to annotate a line, using "/* and * *" to note
Release multiple lines of content. The specific use format is as follows:
<%
Java Code
Single-line Comment
Java Code
/* Multiline Comment
Multi-line Comment */
Java Code
%>

JSP instance:

<body>
<!--this is an HTML comment (visible in the client source code)-->
<%--This is a JSP tag comment (not visible in the client source code)
--%>
<%
/* Here is the JSP script section,
uses the Java language to implement the string output */
Out.println ("This is an annotation instance");
Print out the string
%>
</body>

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.