Servlet Faces Servlet不可用(richfaces 4,tomcat 7) [英] Servlet Faces Servlet is not available (richfaces 4,tomcat 7)

查看:92
本文介绍了Servlet Faces Servlet不可用(richfaces 4,tomcat 7)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试我的第一个richfaces项目.因此,我创建了一个新的JSF项目(使用JBoss Tools eclipse插件),并选择了以下选项:

I am trying out my first richfaces project. So I created a new JSF project (using JBoss Tools eclipse plugin) with the following options selected:

  • JSF2.0
  • JSFKickStartWithoutLibs

我对生成的示例未做任何更改.导出的WAR文件包含以下库

I did no changes to generated sample.The exported WAR file contains the following libraries

  /WEB-INF/lib/common-annotations.jar   
  /WEB-INF/lib/commons-beanutils.jar  
  /WEB-INF/lib/commons-collections.jar 
  /WEB-INF/lib/commons-digester.jar  
  /WEB-INF/lib/commons-logging.jar  
  /WEB-INF/lib/cssparser-0.9.5.jar  
  /WEB-INF/lib/guava-r09.zip  
  /WEB-INF/lib/richfaces-components-api-4.0.0.Final.jar  
  /WEB-INF/lib/richfaces-components-ui-4.0.0.Final.jar  
  /WEB-INF/lib/richfaces-core-api-4.0.0.Final.jar  
  /WEB-INF/lib/richfaces-core-impl-4.0.0.Final.jar  
  /WEB-INF/lib/sacjava-1.3.zip  
  /WEB-INF/lib/standard.jar 

然后我毫无错误地部署到Tomcat的WAR中.但是,启动应用程序(index.html正确地重定向到/pages/inputname.jsf)会导致Web浏览器出现以下错误. catalina.out没有错误

I then deployed to WAR to Tomcat with no errors. But launching the application (the index.html redirects to /pages/inputname.jsf correctly) it results in the following error on web browser. There are no errors in catalina.out

HTTP Status 404 - Servlet Faces Servlet is not available

type Status report

message Servlet Faces Servlet is not available

description The requested resource (Servlet Faces Servlet is not available) is not available.

由于我没有对生成的示例项目进行任何更改,因此我想有些库会丢失.请帮助我解决此问题.

Since I made no changes to the generated sample project, I guess there are some missing libraries. Please help me resolve this issue.

推荐答案

您需要将JSF实现jar捆绑在一起.在WEB-INF\lib(Mojarra或MyFaces)中的jsf-api.jarjsf-impl.jar,因为Tomcat不与JSF jar捆绑在一起

You need to bundle JSF implementation jars viz. jsf-api.jar and jsf-impl.jar inside your WEB-INF\lib (Either Mojarra or MyFaces), since Tomcat does not come bundled with JSF jars

这篇关于Servlet Faces Servlet不可用(richfaces 4,tomcat 7)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆