I have this code:
{{
Page desktopPage = Executions.getCurrent().getDesktop().getPageIfAny("main");
Div center = (Div) desktopPage.getFellow("dashBoardCenter");
Include include = (Include) center.getFellow("dashBoardPage");
include.removeAttribute("params");
include.setSrc(page);
include.invalidate();
}}
If the websockets are enabled in zk.xml
{{<listener>
<listener-class>org.zkoss.zkmax.au.websocket.WebSocketWebAppInit</listener-class>
</listener>}}
I receive this error:
{{GRAVE:
java.lang.NullPointerException
at org.apache.catalina.connector.Response.setLocale(Response.java:907)
at org.apache.catalina.connector.ResponseFacade.setLocale(ResponseFacade.java:357)
at javax.servlet.ServletResponseWrapper.setLocale(ServletResponseWrapper.java:196)
at javax.servlet.ServletResponseWrapper.setLocale(ServletResponseWrapper.java:196)
at org.zkoss.web.servlet.Charsets.setup(Charsets.java:92)
at org.zkoss.web.servlet.Charsets.setup(Charsets.java:132)
at org.zkoss.web.util.resource.ClassWebResource.service(ClassWebResource.java:270)
at org.zkoss.zk.ui.http.ExecutionImpl.dispatch(ExecutionImpl.java:242)
at org.zkoss.zk.ui.http.ExecutionImpl.include(ExecutionImpl.java:203)
at org.zkoss.zul.Include.include(Include.java:706)
at org.zkoss.zul.Include.renderProperties(Include.java:628)
at org.zkoss.zk.ui.AbstractComponent.redraw(AbstractComponent.java:2153)
at org.zkoss.zk.ui.impl.UiVisualizer.redraw(UiVisualizer.java:1003)
at org.zkoss.zk.ui.impl.UiVisualizer.getResponses(UiVisualizer.java:699)
at org.zkoss.zk.ui.impl.UiEngineImpl.getResponses(UiEngineImpl.java:1531)
at org.zkoss.zk.ui.impl.UiEngineImpl.execUpdate(UiEngineImpl.java:1337)
at org.zkoss.zkmax.au.websocket.WebSocketEndPoint.process(WebSocketEndPoint.java:245)
at org.zkoss.zkmax.au.websocket.WebSocketEndPoint.access$000(WebSocketEndPoint.java:61)
at org.zkoss.zkmax.au.websocket.WebSocketEndPoint$1.onMessage(WebSocketEndPoint.java:107)
at org.zkoss.zkmax.au.websocket.WebSocketEndPoint$1.onMessage(WebSocketEndPoint.java:104)
at org.apache.tomcat.websocket.WsFrameBase.sendMessageText(WsFrameBase.java:399)
at org.apache.tomcat.websocket.WsFrameBase.processDataText(WsFrameBase.java:500)
at org.apache.tomcat.websocket.WsFrameBase.processData(WsFrameBase.java:295)
at org.apache.tomcat.websocket.WsFrameBase.processInputBuffer(WsFrameBase.java:131)
at org.apache.tomcat.websocket.server.WsFrameServer.onDataAvailable(WsFrameServer.java:67)
at org.apache.tomcat.websocket.server.WsHttpUpgradeHandler$WsReadListener.onDataAvailable(WsHttpUpgradeHandler.java:204)
at org.apache.coyote.http11.upgrade.AbstractServletInputStream.onDataAvailable(AbstractServletInputStream.java:203)
at org.apache.coyote.http11.upgrade.AbstractProcessor.upgradeDispatch(AbstractProcessor.java:93)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:635)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1770)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1729)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)}}
That doesn't happens when WebSockets are disabled