How can I remove HTML comments in my Facelets?

后端 未结 1 551
谎友^
谎友^ 2020-12-01 09:10

I would like to remove all HTML comments from my facelets before delivering to end users. Does any standard approach exist?

1条回答
  •  醉话见心
    2020-12-01 09:43

    There are actually two ways:

    1. To remove ALL comments, add this to web.xml:

      
          javax.faces.FACELETS_SKIP_COMMENTS
          true
      
      

      or when you're still on JSF 1.2 which doesn't use Facelets as default view technology yet:

      
          facelets.SKIP_COMMENTS
          true
      
      
    2. To remove specific comments only, use .

      
      

    0 讨论(0)
提交回复
热议问题