在我发布问题之前,希望你能回答这个(看起来像一个错误)全新的项目,GF 4.0,OmniFaces 1.6.3
遵循所有说明,但出现此异常
Caused by: java.lang.NullPointerException
at org.omnifaces.util.FacesLocal.getRequestMap(FacesLocal.java:913)
at org.omnifaces.util.FacesLocal.getRequestAttribute(FacesLocal.java:921)
at org.omnifaces.util.Faces.getRequestAttribute(Faces.java:1381)
at org.omnifaces.eventlistener.CallbackPhaseListener.getCallbackPhaseListeners(CallbackPhaseListener.java:110)
at org.omnifaces.eventlistener.CallbackPhaseListener.afterPhase(CallbackPhaseListener.java:77)
at com.sun.faces.lifecycle.Phase.handleAfterPhase(Phase.java:189)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:107)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:647)
... 37 more
这有效:localhost:8080/WEB-APP/javax.faces.resource/layout/my_layout.css
这不起作用(上述异常):localhost:8080/WEB-APP/javax.faces.resource/layout/my_layout.css.html
这不起作用(上述异常):localhost:8080/WEB-APP/javax.faces.resource/layout/my_layout.css.jsf
<h:graphicImage> , <h:outputStylesheet>
等将生成 .jsf / .html 扩展名,因此一切都失败了。