My web project unfortunately has two jars, Mojarra and PrimeFaces and we cannot remove it, the project is too big legacy.
I have removed the CSS and JS belonging to PrimeFaces, by adding the following lines to faces-config.xml
<render-kit><renderer><component-family>javax.faces.Output</component-family><renderer-type>javax.faces.Head</renderer-type><renderer-class>com.sun.faces.renderkit.html_basic.HeadRenderer</renderer-class></renderer></render-kit>
But we need to add these PrimeFaces head stuff to specific pages.
page1.xhtml: must not has these PrimeFaces CSS and JS.
page2.xhtml: has to these PrimeFaces CSS and JS.
Is there any workaround here?