Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jsf-2/2.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 2 JSF2/Richfaces4未加载.ecss文件的内容_Jsf 2_Richfaces - Fatal编程技术网

Jsf 2 JSF2/Richfaces4未加载.ecss文件的内容

Jsf 2 JSF2/Richfaces4未加载.ecss文件的内容,jsf-2,richfaces,Jsf 2,Richfaces,我正在从RichFaces3.3和JSF1.2升级到RichFaces4和JSF2(2.0.6)的Sun实现 我的css文件位于“WebContent/resources/css”下 呈现页面时,所有.css文件都会正确加载 由于某些原因,my.ecss文件的内容无法加载,您知道这是为什么吗 我的web.xml是否需要一些额外的设置 <h:head> <meta http-equiv="Content-Type" content="text/xhtml" charset="

我正在从RichFaces3.3和JSF1.2升级到RichFaces4和JSF2(2.0.6)的Sun实现

我的css文件位于“WebContent/resources/css”下

呈现页面时,所有.css文件都会正确加载

由于某些原因,my.ecss文件的内容无法加载,您知道这是为什么吗

我的web.xml是否需要一些额外的设置

<h:head>
  <meta http-equiv="Content-Type" content="text/xhtml" charset="UTF-8" />

  <title><ui:insert name="pageTitle" /> - </title>

  <h:outputStylesheet library="css" name="broken.ecss" />
  <h:outputStylesheet library="css" name="works.css" />

</h:head>
查看firebug,未找到break.ecs中的样式


我注意到的一件事是文件的路径。我的css文件具有JSF2资源路径,而ecss文件具有Richfaces资源路径。这可能是问题所在(因为我的所有文件都在默认的JSF2资源位置下)

此外,日志中还显示了以下内容:

"GET /AppPath/rfRes/common.ecss.jsf?db=eAHTLYlbCQADeQGp&ln=css HTTP/1.1" 302 -

更新 好的,302是由于web.xml中的错误重定向造成的。现在我可以看到问题的真正原因:

SEVERE: Servlet.service() for servlet [Faces Servlet] in context with path [/WebApp] threw exception [Servlet execution threw an exception] with root cause
java.lang.ClassNotFoundException: com.steadystate.css.parser.CSSOMParser
我是否也需要在我的应用程序中包含某种CSSOMParse jar


谢谢

好的……我下载了cssParser-0.9.5.jar并将其添加到我的webApp中,解决了这个问题

我最初拥有以下jar,我认为这是Richfaces4升级所需的全部:sac-1.0.0.1.jar

在升级到RichFaces4时,似乎没有提到将cssParser jar添加到项目中,这是有原因的还是我遗漏了什么

Richfaces有限的示例、文档,更重要的是,有足够大的社区来回答以下问题,这让我更加沮丧:(

"GET /AppPath/rfRes/common.ecss.jsf?db=eAHTLYlbCQADeQGp&ln=css HTTP/1.1" 302 -
SEVERE: Servlet.service() for servlet [Faces Servlet] in context with path [/WebApp] threw exception [Servlet execution threw an exception] with root cause
java.lang.ClassNotFoundException: com.steadystate.css.parser.CSSOMParser