我性学习的RichFaces的,现在我的JSF项目,但我有问题,在我的环境渲染丰富的成分。的JBoss 7.1,JSF,RichFaces的 - 丰富的组件不希望渲染
我已经加入RichFaces的罐子(从RichFaces的页面中的所有4罐)到JBoss模块(E:\ JBoss的\模块\组织\ RichFaces的\主)与module.xml:
<module xmlns="urn:jboss:module:1.1" name="org.richfaces">
<resources>
<resource-root path="richfaces-components-api-4.2.1.Final.jar"/>
<resource-root path="richfaces-components-ui-4.2.1.Final.jar"/>
<resource-root path="richfaces-core-api-4.2.1.Final.jar"/>
<resource-root path="richfaces-core-impl-4.2.1.Final.jar"/>
<!-- Insert resources here -->
</resources>
<dependencies>
<module name="org.w3c.css.sac"/>
<module name="net.sourceforge.cssparser"/>
<module name="com.sun.jsf-impl"/>
<module name="javax.api"/>
<module name="javax.faces.api"/>
<module name="javax.xml.bind.api"/>
<module name="javax.xml.jaxp-provider"/>
<module name="com.google.guava"/>
</dependencies>
</module>
添加所有的依赖到默认配置jboss模块。
我创建简单的JSF页面,RichFaces的从教程:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:rich="http://richfaces.org/rich"
xmlns:a4j="http://richfaces.org/a4j">
<h:head></h:head>
<body>
<rich:panel>
<f:facet name="header">
Write your own custom rich components with built-in AJAX support
</f:facet>
<h:outputText value="Panel Body" />
</rich:panel>
<rich:panel>
<f:facet name="header">
Write your own custom rich components with built-in AJAX support
</f:facet>
<h:outputText value="Panel Body" />
<a4j:form>
<h:outputText value="The integer version of the selected color:" />
<h:outputText id="RGBvalue" value="#{colorPickerBean.color}" />
<rich:panel header="RichFaces Color Picker" style="width: 315px">
<rich:colorPicker value="#{colorPickerBean.color}" colorMode="rgb"
converter="org.richfaces.IntegerColor">
<a4j:support event="onchange" reRender="RGBvalue" />
</rich:colorPicker>
</rich:panel>
</a4j:form>
</rich:panel>
</body>
</html>
在head标签的xmlns都突出了“NLS失踪消息:CANNOT_FIND_FACELET_TAGLIB在:org.eclipse.jst.jsf.core.validation.internal .facelet.messages”
我已经部署了我新的XHTML页面JBoss和现在那些有钱人组件不正确的处理。下一个清单显示已部署页面的来源。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:rich="http://richfaces.org/rich" xmlns:a4j="http://richfaces.org/a4j"><head></head>
<body>
<rich:panel>Panel Body
</rich:panel>
<rich:panel>Panel Body
<a4j:form>The integer version of the selected color:<span id="RGBvalue"></span>
<rich:panel header="RichFaces Color Picker" style="width: 315px">
<rich:colorPicker colorMode="rgb" converter="org.richfaces.IntegerColor">
<a4j:support event="onchange" reRender="RGBvalue"></a4j:support>
</rich:colorPicker>
</rich:panel>
</a4j:form>
</rich:panel>
</body>
</html>
我的JBoss的部署,structure.xml中的WebContent/META-INF:
<jboss-deployment-structure>
<sub-deployment name="Tutorial2.war">
<dependencies>
<module name="org.richfaces" slot="main">
<imports>
<include path="**" />
</imports>
</module>
</dependencies>
</sub-deployment>
</jboss-deployment-structure>
模块定义为显示在链接https://issues.jboss.org/browse/RF-12008
几个变化后,我得到了
00:29:52,455 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC00001: Failed to start service jboss.deployment.unit."Tutorial2.war".STRUCTURE: org.jboss.msc.service.StartException in service jboss.deployment.unit."Tutorial2.war".STRUCTURE: Failed to process phase STRUCTURE of deployment "Tutorial2.war"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) [rt.jar:1.6.0_31]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.6.0_31]
at java.lang.Thread.run(Unknown Source) [rt.jar:1.6.0_31]
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: Sub deployment Tutorial2.war in jboss-structure.xml was not found. Available sub deployments:
at org.jboss.as.server.deployment.module.descriptor.DeploymentStructureDescriptorParser.subDeploymentNotFound(DeploymentStructureDescriptorParser.java:233) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.server.deployment.module.descriptor.DeploymentStructureDescriptorParser.deploy(DeploymentStructureDescriptorParser.java:159) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
... 5 more
只要将jboss-deployment-structure.xml添加到WEB-INF中,就会发生错误。
是您'的JBoss部署Tutorial2.war中的“-structure.xml”如果是的话,那么它可能不应该是一个' '。看看文档。 https://docs.jboss.org/author/display/AS71/Class+Loading+in+AS7#ClassLoadinginAS7-JBossDeploymentStructureFile –
2012-04-27 18:18:29
我曾尝试没有子部署部分和标签丰富标签不希望渲染。 <?XML版本= “1.0” 编码= “UTF-8”> <依赖性> <模块名称= “org.richfaces”插槽=“主” /> 依赖> JBoss的部署结构> –
2012-04-28 14:33:43