如何在Struts标签中添加注释?

时间:2012-09-25 14:15:52

标签: struts2 comments

我有以下标记,如何在其中添加评论?

<s:select id="productPrice.product" 
          name="productPrice.product"
          headerKey="0" 
          headerValue="-- Select Product --"
          list="products" 
          listKey="id" 
          listValue="name"
          value="productPrice.product.id"
          theme="simple"
          onchange="getDisplayName(value)"       <!-- How to comment here ? -->
          />

我试过了:

<!-- abc -->
<%-- abc --%>
// abc

它们都不起作用,这是正确的方法吗?

1 个答案:

答案 0 :(得分:1)

您无法将评论放在标记内。您必须将它们放在Struts2标记的上方或下方。 Struts2标签与HTML标签没有区别,因此: