the follow code is on a JSF header.xhtml template. the page that loads is home.xhtml which has the header.xhtml template reference from the main template and is included using ui:composition template="header.xhtml" note: the home.xhtml has no code except the ui:composition
below is the code on the template header.xhtml
<form id="headerForm" name="frmSearch" method="get"
action="search.xhtml">
Search <input id="input1" type="text" a:required="true"
name="keyword" value="#{param['keyword']}" a:autofocus="true" />
<p:focus for="input1"/>
<f:param name="keyword" value="#{param['keyword']}" />
</form>