XML prolog / instruction not removed from XHTML output

前端 未结 2 1503
清酒与你
清酒与你 2020-12-10 13:51

I\'m starting to learn JavaServer Faces (JSF). I\'m using GlassFish 3+. I\'ve just created a new JSF project in NetBeans and run the project. It worked fine, but upon examin

2条回答
  •  粉色の甜心
    2020-12-10 14:03

    In order to get the XML declaration to not appear on my rendered pages, I found that I could configure JSF to process my .xhtml files as XML. When processing in XML mode, the xml declaration would not pass through from my source files to the output. I have not yet noticed any other side effects to making this change. (But if I find any, I will follow up here.)

    To make the config change, I added the following to my faces-config.xml:

    
        
            .xhtml
            xml
          
        
    

    Hope this helps

提交回复
热议问题