Skip to main content

Secure websocket ssl wss:// in glassfish 4.0 Java EE7

No replies
Joined: 2013-10-22
Points: 0

I'm developing a websockets application in glassfish 4.0. Everything is working fine when not using SSL but i can't put things to work when SSL is in use.


I'm using an annotated Java object as a server:

public class WebSocketServerEndPoint {...}


On the client side i use the following javascript:

var webSocket = new WebSocket('wss://mydomain:8181/websocketserver/websocket/sessionXXX');


In the deployment descriptor web.xml i have a security constraint to make sure the application can't be accessed by other means than ssl.

I have tested https by visiting index.html test page, which shows correctly.


Any thoughts about why ssl is not working when using websockets but works fine when using https?