title: cannot find faces context in jsf
body: <p>I am trying to create a simple program on JSF.I deployed it on JBOSS 5 server.But when i try to run it it throws these exception.</p>
  
  <blockquote>
    <p><strong>type</strong> Exception report</p>
    
    <p><strong>message</strong>  description The server encountered an internal error () that prevented
    it from fulfilling this request.</p>
    
    <p><strong>exception</strong> org.apache.jasper.JasperException: java.lang.RuntimeException: Cannot
    find FacesContext
      org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:515)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:411)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:322)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)</p>
    
    <p><strong>root cause</strong> </p>
    
    <p>java.lang.RuntimeException: Cannot find FacesContext
      javax.faces.webapp.UIComponentClassicTagBase.getFacesContext(UIComponentClassicTagBase.java:1855)
      javax.faces.webapp.UIComponentClassicTagBase.setJspId(UIComponentClassicTagBase.java:1672)
      org.apache.jsp.index_jsp._jspx_meth_f_005fview_005f0(index_jsp.java:90)
      org.apache.jsp.index_jsp._jspService(index_jsp.java:67)
      org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:322)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)</p>
  </blockquote>