Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/jsf/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在JSF projet中使用glassfish作为服务器的PrettyFaces?_Jsf - Fatal编程技术网

如何在JSF projet中使用glassfish作为服务器的PrettyFaces?

如何在JSF projet中使用glassfish作为服务器的PrettyFaces?,jsf,Jsf,我试图在jsf项目中使用PrettyFaces,但在部署projet时出错。 这就是我所做的: 我在我的web.xml中添加了以下内容: <filter> <filter-name>Pretty Filter</filter-name> <filter-class>com.ocpsoft.pretty.PrettyFilter</filter-class> </filter> <f

我试图在jsf项目中使用PrettyFaces,但在部署projet时出错。 这就是我所做的: 我在我的web.xml中添加了以下内容:

    <filter>
   <filter-name>Pretty Filter</filter-name>
   <filter-class>com.ocpsoft.pretty.PrettyFilter</filter-class>
    </filter>

    <filter-mapping> 
       <filter-name>Pretty Filter</filter-name> 
       <url-pattern>/*</url-pattern> 
       <dispatcher>FORWARD</dispatcher> 
       <dispatcher>REQUEST</dispatcher> 
       <dispatcher>ERROR</dispatcher>
    </filter-mapping>
我正在用网虫和玻璃鱼。 更新: 我解决了第一个问题,它是由使用坏罐子引起的

不,当Pretty-config.xhtml为空时,我集成了Prettyfaces并可以工作,但当我在运行projet时添加此代码时,我没有错误,但我看到了白色页面

这就是我要补充的:

<url-mapping id="accueil"> 
    <pattern value="/" /> 
       <view-id value="/admin/adminHome.xhtml" />             
    </url-mapping>


我该如何解决这个问题呢???

您要包括
prettyfaces-jsf2-3.3.0-sources
(prettyfaces的源代码)您必须包括二进制jar。例如,从这里开始:

或者从这里开始

我使用了您的jar,但在部署过程中仍然出现错误:加载应用程序时出现异常:原因:Class'com.ocpsoft.pretty.faces.event.PrettyPhaseListener'缺少运行时依赖项:java.lang.NoClassDefFoundError:org/apache/commons/logging/LogFactory。有关更多详细信息,请参阅server.log。错误状态为,类路径中需要
LogFactory
。将
commons logging
jar添加到类路径。它解决了最后一个错误,但在运行项目Grave:WebModule[/PlanificationDrapageWeb]时出现了新错误PWC1270:Exception starting filter Pretty filter java.lang.NoClassDefFoundError:org/apache/commons/beanutils/Converter引起的异常:java.lang.ClassNotFoundException:org.apache.commons.beanutils.Converter避免事件:StandardWrapperValve[Facesservlet]:PWC1406:Servlet.service()对于servlet Faces,servlet抛出异常java.lang.NullPointerException Avertisement:ApplicationDispatcher[/PlanificationDrapageWeb]PWC1231:根据此链接,我认为您的类路径有一些问题。请尝试“将prettyfaces jar打包到EAR中,而不是WAR中,用于EAR部署。”我修复了这个问题,我只是添加了两个jar,执行相同的规则,现在我使用了你在上一篇文章中所说的所有内容,并且它在pretty-config.xml没有代码的情况下工作,但是当我添加到我的代码时,当我运行我的项目时,我有一个白色页面,我什么也看不到,你知道为什么吗?
deploy?DEFAULT=C:\Users\hp\Documents\NetBeansProjects\PlanificationDrapage\dist\gfdeploy\PlanificationDrapage&name=PlanificationDrapage&force=true failed on GlassFish Server 3+ 
 Error occurred during deployment: Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.IllegalArgumentException: java.lang.ClassNotFoundException: com.ocpsoft.pretty.faces.config.PrettyConfigListener. Please see server.log for more details.
C:\Users\hp\Documents\NetBeansProjects\PlanificationDrapage\nbproject\build-impl.xml:294: The module has not been deployed.
<url-mapping id="accueil"> 
    <pattern value="/" /> 
       <view-id value="/admin/adminHome.xhtml" />             
    </url-mapping>