是否可以CombinedResourceHandler
忽略 RichFaces JS 文件?
当我让omnifaces组合所有JS文件时,包括RichFaces和Richfaces优化关闭
<context-param>
<param-name>org.richfaces.resourceOptimization.enabled</param-name>
<param-value>false</param-value>
</context-param>
我得到以下异常
SEVERE: Error Rendering View[/login.xhtml]
java.lang.UnsupportedOperationException
at org.richfaces.resource.ExternalStaticResource.getURL(ExternalStaticResource.java:90)
at org.omnifaces.resourcehandler.CombinedResourceInfo.loadResources(CombinedResourceInfo.java:229)
at org.omnifaces.resourcehandler.CombinedResourceInfo.getLastModified(CombinedResourceInfo.java:303)
at org.omnifaces.resourcehandler.CombinedResource.getRequestPath(CombinedResource.java:92)
at com.sun.faces.renderkit.html_basic.StylesheetRenderer.encodeEnd(StylesheetRenderer.java:106)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:875)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1786)
at com.sun.faces.renderkit.html_basic.HeadRenderer.encodeHeadResources(HeadRenderer.java:105)
at com.sun.faces.renderkit.html_basic.HeadRenderer.encodeEnd(HeadRenderer.java:92)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:875)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1786)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1782)
at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:424)
at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:125)
at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:288)
at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:288)
at com.caucho.server.webbeans.ConversationJsfViewHandler.renderView(ConversationJsfViewHandler.java:81)
at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:288)
at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:288)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:121)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
at org.apache.myfaces.extensions.cdi.jsf2.impl.listener.phase.CodiLifecycleWrapper.render(CodiLifecycleWrapper.java:126)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)
...
但是,无论我在 context param 中输入什么org.omnifaces.COMBINED_RESOURCE_HANDLER_EXCLUDED_RESOURCES
,我都无法排除任何 Richfaces 资源。我尝试了参数值,例如
<param-value>richfaces:richfaces.js, richfaces:richfaces-queue.js, richfaces:richfaces-base-component.js</param-value>