I have the following JSF page:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.org/ui">
<h:body>
<h1>Example</h1>
<h:form>
<h:panelGrid columns="2" cellpadding="5">
<h:outputText value="Counter: " />
<h:outputText id="txt_count" value="#{counterBean.count}" />
</h:panelGrid>
<p:commandButton value="Count" actionListener="#{counterBean.increment}" update="txt_count"/>
</h:form>
</h:body>
</html>
When it loads it doesn’t include jQuery on the page (CSS file as well).
Is there any special configuration to force PrimeFaces to include jQuery and CSS?
You forgot to declare the
<h:head>.CSS/JS resources are auto-included through the
<h:head>.