And that's using the https listener, yes? When you create your
websocket client, are you telling it ws:// or wss:// ?
On 7/7/11 11:14 AM, Mohamed Maza wrote:
> Thanks for the response.
>
> Yes, I enable websockets using:
>
> asadmin set configs.config.server-config.network-config.protocols.protocol.http-listener-2.http.websockets-support-enabled=true
>
> And got:
> configs.config.server-config.network-config.protocols.protocol.http-listener-2.http.websockets-support-enabled=true
> Command set executed successfully.
>
> What baffles me is, that it is working if I ignore the Exception and try to connect again: I get the correct results from the WebSocketApplication.
> This is happening only the first time after glassfish-server start, subsequent connections from my app work without the exception :/
>
> Thanks
>
> -----Ursprüngliche Nachricht-----
> Von: Justin Lee [mailto:justin.d.lee_at_oracle.com]
> Gesendet: Donnerstag, 7. Juli 2011 15:25
> An: users_at_glassfish.java.net
> Cc: forums_at_java.net; users_at_glassfish.dev.java.net
> Betreff: Re: WebSockets returning: Response code was not 101: 405
>
> Did you enable websockets on that listener?
>
> On 7/7/11 4:37 AM, forums_at_java.net wrote:
>> Hi,
>>
>> I have moved to GlassFish 3.1.1 b09 which has Grizzly 1.9.36 to test
>> the websocket support there.
>>
>> I deployed the same application that I had on GlassFish 3.1 b43 (after
>> removing some now unnecessary Exception-catches).
>>
>> Now I am getting in the client app this IOException: "Response code
>> was not
>> 101: 405", but the application just runs smoothly and I get the
>> excepted results.
>>
>> Can I ignore this Exception or is there something I need to do to get
>> rid of it?
>>
>> The exception is occuring:
>>
>> In my code:
>>
>> new ClientWebSocket("wss://localhost:8181/WebSocketServer/websocket",
>> myListener);
>>
>> In following the grizzly code in:
>>
>> ClientHandShake.validateServerResponse(headers);
>>
>> Thanks in advance!
>>
>> Regards
>>
>>
>> --
>>
>> [Message sent by forum member 'MohamzJava']
>>
>> View Post: http://forums.java.net/node/819491
>>
>>