Skip to main content

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

Posted by mriem on February 7, 2014 at 12:04 PM PST

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"

And that is it.

Enjoy!

Related Topics >>