Hi,
On Mon, Dec 28, 2015 at 4:49 PM, Daniel Stoch <daniel.st...@gmail.com> wrote: > Hi, > > As I wrote in my previous post "Native WebSockets - cookies and last > handler question": In WebSocketResponse many methods throws > UnsupportedOperationException. Some of them can be customized now > thanks to WICKET-6054. > > But I have found another problem with WebSocketResponse.sendRedirect() > method. When you send a message using > IWebSocketConnection.sendMessage() and an exeption is raised somewhere > during processing of this message you can get the following exception > (the orignal exception is lost): > > Error during processing error message > java.lang.UnsupportedOperationException > at > org.apache.wicket.protocol.ws.api.WebSocketResponse.sendRedirect(WebSocketResponse.java:205) > at > org.apache.wicket.request.handler.render.WebPageRenderer.redirectTo(WebPageRenderer.java:176) > at > org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:327) > at > org.apache.wicket.core.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:175) > at > org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:890) > at > org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64) > at > org.apache.wicket.request.cycle.RequestCycle.executeExceptionRequestHandler(RequestCycle.java:310) > at > org.apache.wicket.request.cycle.RequestCycle.executeExceptionRequestHandler(RequestCycle.java:319) > at > org.apache.wicket.request.cycle.RequestCycle.executeExceptionRequestHandler(RequestCycle.java:319) > at > org.apache.wicket.request.cycle.RequestCycle.executeExceptionRequestHandler(RequestCycle.java:319) > at > org.apache.wicket.request.cycle.RequestCycle.executeExceptionRequestHandler(RequestCycle.java:319) > at > org.apache.wicket.request.cycle.RequestCycle.executeExceptionRequestHandler(RequestCycle.java:319) > at > org.apache.wicket.request.cycle.RequestCycle.executeExceptionRequestHandler(RequestCycle.java:319) > at > org.apache.wicket.request.cycle.RequestCycle.executeExceptionRequestHandler(RequestCycle.java:319) > at > org.apache.wicket.request.cycle.RequestCycle.executeExceptionRequestHandler(RequestCycle.java:319) > at > org.apache.wicket.request.cycle.RequestCycle.executeExceptionRequestHandler(RequestCycle.java:319) > at > org.apache.wicket.request.cycle.RequestCycle.executeExceptionRequestHandler(RequestCycle.java:319) > at > org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:233) > at > org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:289) > at > org.apache.wicket.protocol.ws.api.AbstractWebSocketProcessor.broadcastMessage(AbstractWebSocketProcessor.java:251) > at > org.apache.wicket.protocol.ws.api.AbstractWebSocketConnection.sendMessage(AbstractWebSocketConnection.java:43) > > > This is because WebPageRenderer by default calls redirectTo method. So > it looks like WebSocketResponse.sendRedirect() should not throw > exception in the default implementation? > The default is to throw an exception so that you know that you are trying to do something that is really not supported. But now I think we can actually add support for it - as Ajax does with <ajax-response><redirect>...</redirect></ajax-response> Please file a ticket with a quickstart app! Thank you! > > -- > Best regards, > Daniel > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >