Error Parsing /page.xhtml: Error Traced[line: 42] The entity “nbsp” was referenced, but not declared

后端 未结 5 2230
说谎
说谎 2020-11-29 22:56

I\'d like to use non breaking spaces in my JSF page. I know, in plain HTML I could use   for this and this works fine. However, when I put those

5条回答
  •  借酒劲吻你
    2020-11-29 23:34

    Facelets is a XML based view technology. XML has only five predefined entities. The   is not among them. It works only when used in plain HTML or in legacy JSP (note: it doesn't work in JSPX as that's also XML based!).

    To fix this, you either need to declare the entity yourself in the doctype of the very XHTML file containing the   entity,

     
    ]>
    

    or, better, use the (hexa)decimal notation instead:

      or  
    

    In an average IDE it should be trivial to perform a "find and replace in all files" and replace every occurrence of   by  .

提交回复
热议问题