Hello, Booren thanks for your help, i found the code
getRequestCycleListeners().add(new IRequestCycleListener() { @Override public void onEndRequest(RequestCycle cycle) { WebResponse response = (WebResponse) cycle.getResponse(); response.setHeader("X-XSS-Protection", "1; mode=block"); response.setHeader("Strict-Transport-Security", "max-age=31536000; includeSubDomains; preload"); response.setHeader("X-Content-Type-Options", "nosniff"); } }); I should be let nginx to set header instead. By the way, when i commented on those codes , the websocket errors were disappeared. Thank you. From: Bas Gooren <b...@iswd.nl.INVALID> Date: Monday, September 8, 2025 at 1:47 AM To: users@wicket.apache.org <users@wicket.apache.org> Subject: Re: WebSocket issue Hi! It looks like you have a RequestCycle listener (an anonymous class inside your tw.com.slsinfo.WicketApplication class), which is throwing an exception in its “onEndRequest” implementation. Since that is your own code, you need to have a look at line 108 in your WicketApplication and figure out why it is throwing an exception 🙂 Met vriendelijke groet, Kind regards, Bas Gooren Op 7 sep 2025, 18:04:30 schreef 黃魚鴞 <front...@gmail.com>: > Dear all > > One i add WebSocketBehavior on page, when i start the web server (Wildfly) > , it showed error message: > > 16:01:43,648 ERROR [stderr] (default task-1) [default task-1] ERROR > org.apache.wicket.request.cycle.RequestCycle - Exception occurred during > onEndRequest > > 16:01:43,648 ERROR [stderr] (default task-1) > java.lang.UnsupportedOperationException > > 16:01:43,648 ERROR [stderr] (default task-1) at > deployment.llm4class-web-0.0.1-SNAPSHOT.war//org.apache.wicket.protocol.ws.api.WebSocketResponse.setHeader(WebSocketResponse.java:185) > > 16:01:43,648 ERROR [stderr] (default task-1) at > deployment.llm4class-web-0.0.1-SNAPSHOT.war//tw.com.slsinfo.WicketApplication$1.onEndRequest(WicketApplication.java:108) > > How do I fix this? > > Shengche > > >