Wildfly 10问题与css文件 [英] Wildfly 10 issue with css file

查看:366
本文介绍了Wildfly 10问题与css文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<h:outputStylesheet library="test/css"  name="style.css" />

上述代码在中无法运行wildfly 10 使用jar文件 jsf-impl-2.2.12-jbossorg-2

Above code is not working in wildfly 10 with jar file jsf-impl-2.2.12-jbossorg-2.

问题是:

WARNING [javax.enterprise.resource.webcontainer.jsf.application] (default task-6) JSF1064: Unable to find or serve resource, style.css, from library, test/css.

任何人都可以帮助吗?

推荐答案

库属性的值不应该是一个路径,而是一个文件夹(分组css,js等)

The value of a library attribute should not be a path but to a single folder (grouping css ,js etc.)

所以更改

<h:outputStylesheet library="test/css"  name="style.css" />

<h:outputStylesheet library="test"  name="css/style.css" />

应该使它工作。

Mojarra在这方面一直是自由主义的,似乎他们正在改善事情。我遇到与复合组件位置相似的差异。 MyFaces还没有允许在那里的路径,而Mojarra(至少为2.2.12)仍然可以。

Mojarra has been to liberal in this and it seems they are 'improving' things. I ran into a similar difference with the location of composite components. MyFaces did not allow paths in there as well, while Mojarra (until at least 2.2.12) still does.

有关最佳用法的更多详细信息,请参阅

For more details on best usage, see

  • What is the JSF resource library for and how should it be used?

这篇关于Wildfly 10问题与css文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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