Jsp comments may affect page loading speed. jsp comments may affect page loading.

Source: Internet
Author: User

Jsp comments may affect page loading speed. jsp comments may affect page loading.

Use "<! --> "Comment. The java code in the comment will still be executed. You can view the executed content on the page source code, in this way, the code that you do not want to execute will be executed, affecting the loading speed. For example, the following code:

Gender: <select name = "qureyItemGroup. sex "class =" selindium "style =" width: 75px; "> <option value =" "> all </option> <s: iterator value = "listDictSex"> <option <s: property value = "@ com. hljw. util. utilAPI @ getHtmlSelected (dict_value, qureyItemGroup. sex) "/> value =" <s: property value = "dict_value"/> "> <s: property value =" dict_name "/> </option> </s: iterator> </select>

We recommend that you use annotations such as <% -- %> On the jsp page, and such annotations are invisible for viewing source code on the page.


JSP page comments

<! --
Comment content
-->

<% --
Comment content
-- %>

The two functions are the same.

How to Use Annotations on jsp pages

// Only javascript in jsp can be commented
<! -- Comments -->
<% -- Note -- %>

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.