websocket 整合到struts2 框架 404 必杀解决方案

问题:整合到一起总是报错404 连接失败。

必杀解决方案:如图,找到struts.xml 然后在里面添加内容如下:

<!-- struts2拦截器不拦截websocket相关请求 -->
<constant name="struts.action.excludePattern" value="ws://*,wss://*,/websocket*,^ws://.$"/>

websocket 整合到struts2 框架 404 必杀解决方案