错误。
1:tomcat 5.x都支持
2:你要下好参考实现
3:配置 web.xml和faces-config.xml就可以了。。

解决方案 »

  1.   

    碰到同样的问题,按教程配置好web.xml和faces-config.xml还是不行。
      

  2.   

     应该是类库少包的问题 
    兄弟看看lib下面的包
      

  3.   

    java.lang.NoClassDefFoundError说明没有类,一定是jar包不全
      

  4.   

    I haven't delved very much in this, but my understanding is that until Tomcat supports JSP 2.1 and Servlet 2.5, JSF 1.2 wont work inside Tomcat, unless you use facelets. Support for JSP 2.1 and Servlet 2.5 is expected to be introduced in Tomcat 6. I wouldn't expect this to happen before another 6 months.
      

  5.   

    tldCache is a performance-oriented enhancement file, preventing rescanning of
    certain files for TLDs (JSP tag library descriptors). 在本例中你一定是先试用了1.2结果在tomcat中产生了缓存,到work目录下把他删掉,然后用你的1.1重试即可。如果想试试1.2,那就去下载sun的glassfish吧:(
      

  6.   

    我也遇到类似的问题,不过没用1.1版,用的是1.2版和1.0版,一次也没成功过,老是提示type Exception reportmessage description The server encountered an internal error () that prevented it from fulfilling this request.exception org.apache.jasper.JasperException: Exception in JSP: /validatorTest.jsp:118:     <meta http-equiv="Content-Type" content="text/html; charset=GBK"/>
    9:     <title>untitled1</title>
    10:   </head>
    11:   <body><f:view>
    12:       <h:form>
    13:         <h:selectBooleanCheckbox/> 
    14:         为什么
    Stacktrace:
    org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:504)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    root cause javax.servlet.ServletException: Cannot find FacesContext
    org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:858)
    org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791)
    org.apache.jsp.validatorTest_jsp._jspService(validatorTest_jsp.java:101)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    root cause javax.servlet.jsp.JspException: Cannot find FacesContext
    javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:401)
    com.sun.faces.taglib.jsf_core.ViewTag.doStartTag(ViewTag.java:105)
    org.apache.jsp.validatorTest_jsp._jspx_meth_f_view_0(validatorTest_jsp.java:116)
    org.apache.jsp.validatorTest_jsp._jspService(validatorTest_jsp.java:90)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)