我的项目要在 glassfish 4.1 上工作,但它在以前版本的 Richfaces 和 glassfish 上不断出现 "unable to find resource JQuery.js"
,它工作了 100%。它现在破坏了我的菜单等,并有一个恼人的弹出窗口显示错误。
<h:outputScript name="jquery.js"/>
或
<h:outputScript name="jquery.js" target="head"/>
不能再用了,有什么建议吗?
还要确保核心包含在内。 POM:
<dependencies>
<dependency>
<groupId>org.richfaces</groupId>
<artifactId>richfaces</artifactId>
<version>4.5.0.CR1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.richfaces</groupId>
<artifactId>richfaces-core</artifactId>
<version>4.5.0.CR1</version>
</dependency>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-web-api</artifactId>
<version>7.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
依赖项包括:
sac-1.3
cssparser-0.9.14
guava-18.0
richfaces-4.5.0.CR1
richfaces-core-4.5.0.CR1
richfaces-a4j-4.5.0.CR1
有什么遗漏吗?
谢谢。
最佳答案
使用
<h:outputScript library="org.richfaces" name="jquery.js"/>
你用这个做什么? JQuery 自动包含在 RichFaces 中。
关于JSF Richfaces 4.5 找不到资源 JQuery.js,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26235471/