JSF Tip #58 - What does the context-param com.sun.faces.validateXml do?

The "com.sun.faces.validateXml" context-param makes it possible for you to have the Mojarra JSF runtime verify your configuration files against the faces-config.xml schema. If an error is found you will immediately be made aware as deployment will fail until you fix the problem.

Note when you are ready to go to production the "com.sun.faces.validateXml" context-param should be set to "false".

In your web.xml file this would look like the snippet below.


    <context-param>
        <param-name>com.sun.faces.validateXml</param-name>
        <param-value>false | true</param-value>
    </context-param>
        

Note the value is either "true" or "false"

Posted February 7, 2014

Up