diff --git a/modules/cpr/src/main/java/org/atmosphere/container/GlassFishServ30WebSocketSupport.java b/modules/cpr/src/main/java/org/atmosphere/container/GlassFishServ30WebSocketSupport.java index ba70fb6..3d516cb 100644 --- a/modules/cpr/src/main/java/org/atmosphere/container/GlassFishServ30WebSocketSupport.java +++ b/modules/cpr/src/main/java/org/atmosphere/container/GlassFishServ30WebSocketSupport.java @@ -47,7 +47,8 @@ public GlassFishServ30WebSocketSupport(AtmosphereConfig config) { super(config); application = new Grizzly2WebSocketApplication(config); - WebSocketEngine.getEngine().register(application); + WebSocketEngine.getEngine().register( + config.getServletContext().getContextPath(), "/", application); } @@ -87,7 +88,7 @@ private static final class Grizzly2WebSocketApplication extends WebSocketApplication { private AtmosphereConfig config; - private final String contextPath; +// private final String contextPath; private final WebSocketProcessor webSocketProcessor; // -------------------------------------------------------- Constructors @@ -95,7 +96,7 @@ public Grizzly2WebSocketApplication(AtmosphereConfig config) { this.config = config; - contextPath = config.getServletContext().getContextPath(); +// contextPath = config.getServletContext().getContextPath(); this.webSocketProcessor = WebSocketProcessorFactory.getDefault() .getWebSocketProcessor(config.framework()); } @@ -110,10 +111,10 @@ } } - @Override - public boolean isApplicationRequest(HttpRequestPacket request) { - return request.getRequestURI().startsWith(contextPath); - } +// @Override +// public boolean isApplicationRequest(HttpRequestPacket request) { +// return request.getRequestURI().startsWith(contextPath); +// } @Override public void onClose(WebSocket socket, DataFrame frame) {