The <h:head>
is a JSF component which provides a hook to programmatically include JavaScript and CSS resources in the generated HTML <head>
. PrimeFaces uses it to include the necessary JS/CSS code for the Ajax works and fancy look'n'feel.
As a test, create a page with a <h:head>
and a PrimeFaces
component, open the page in the webbrowser and check the generated HTML source by rightclick - View Source. You'll see that several JSF and PrimeFaces specific JS/CSS files are been added. Now replace <h:head>
by <head>
and check the generated HTML source once again, you'll see nothing this time.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…