title: problem with primefaces library (jsf)
body: <p>i am new to primeface.</p>
  
  <p>i have tried to test an example of primefaces about  tag as in its documentation, </p>
  
  <p>this is my jsf page code:</p>
  
  <pre><code>&lt;%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%&gt;
  &lt;%@taglib uri="http://primefaces.prime.com.tr/ui" prefix="p"%&gt;
  &lt;%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%&gt;
  &lt;%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%&gt;
  &lt;%
  String path = request.getContextPath();
  String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
  %&gt;
  
  &lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"&gt;
  &lt;html&gt;
  
   &lt;head&gt;
  
    &lt;base href="&lt;%=basePath%&gt;"&gt;
  
    &lt;title&gt;My JSP 'index.jsp' starting page&lt;/title&gt;
   &lt;/head&gt;
  
   &lt;body&gt;
    &lt;f:view&gt;
     &lt;h:form&gt;
      &lt;h:outputText id="txt_count" value="#{counterBean.count}" /&gt;
      &lt;p:poll actionListener="#{counterBean.increment}" update="txt_count" /&gt;
     &lt;/h:form&gt;
    &lt;/f:view&gt;
   &lt;/body&gt;
  
  
  &lt;/html&gt;
  </code></pre>
  
  <p>and this is my backbean code:
  [code]</p>
  
  <pre><code>import javax.faces.event.ActionEvent;
  
  
  public class CounterBean {
  private int count;
  public void increment(ActionEvent actionEvent) {
  count++;
  }
  //getters and setters
  public int getCount() {
   return count;
  }
  public void setCount(int count) {
   this.count = count;
  }
  }
  </code></pre>
  
  <p>but when i tried to running it. i got this error:</p>
  
  <pre><code>java.lang.IllegalStateException: Component javax.faces.component.UIViewRoot@ed32c4 not expected type.  Expected: javax.faces.component.UIForm.  Perhaps you're missing a tag?
   com.sun.faces.taglib.html_basic.FormTag.setProperties(FormTag.java:199)
   javax.faces.webapp.UIComponentClassicTagBase.findComponent(UIComponentClassicTagBase.java:586)
   javax.faces.webapp.UIComponentClassicTagBase.doStartTag(UIComponentClassicTagBase.java:1070)
   com.sun.faces.taglib.html_basic.FormTag.doStartTag(FormTag.java:273)
   org.apache.jsp.index_jsp._jspx_meth_h_005fform_005f0(index_jsp.java:120)
   org.apache.jsp.index_jsp._jspService(index_jsp.java:93)
   org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
   org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
   org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
   org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
   com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:428)
   com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHandlerImpl.java:444)
   com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:116)
   com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
   com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
   com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
   javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
  </code></pre>
  
  <p>what is wrong? how can i solve it? i am using tomcat 6
  thanks in advance</p>