Hi,

Hi,

> Hi,
>
> I've embedded tomcat 8.0.20 and using that. I build the tomcat websocket
> example and when I'm trying to run it in my server for all 4 examples
> (Echo, chat, etc..)
> I'm getting
>
>> Info: WebSocket connection closed, Code: 1006
>
>
> In the console it prints
>
> WebSocket connection to 'ws://
>> 10.100.7.26:9763/examples/websocket/echoProgrammatic' failed: Error
>> during WebSocket handshake: Unexpected response code: 302
>
>
> This same war file is running perfectly on Tomcat distribution.
>
> Can someone tell me what could be the reason for this?

>>It looks like you haven't deployed the WebSocket examples correctly. My
>>guess is you are seeing the 302 redirect to
>>/examples/websocket/echoProgrammatic/ you'd get if this was being
>>handled as a static resource.
>>Thanks for quick response. But I think you misunderstood what I mean.
>>I'm not getting 10.100.7.26:9763/examples/websocket/echoProgrammatic'
failed: Error during WebSocket handshake: Unexpected response code: 302
>>I'm getting that for the echo sample programmatic API option.

>>For each and every websocket sample I'm getting Info: WebSocket
connection closed, Code: 1006
>>And in the console it says something like
>>WebSocket connection to ws://10.100.7.26:9763/examples/websocket/
<http://10.100.7.26:9763/examples/websocket/echoProgrammatic>... failed:
Error during WebSocket handshake: Unexpected response code: 302

>>>When I tried to deploy the sample distributed with Tomcat it works fine
in my server.
>>>Seems that I did something wrong while building the sample. Can someone
help me out?

Furthermore I've tried following things out and both options works without
issue.

   1. Running tomcat distributed examples in my server
   2. Running the war file that I built inside Tomcat

I've mistaken here. My war file doesn't run on Tomcat either.


When I used the following dependency to build the example webapp, instead
of 302 I'm getting 404 error.

<dependency>
    <groupId>javax.websocket</groupId>
    <artifactId>javax.websocket-api</artifactId>
    <version>1.0</version>
    <scope>provided</scope>
</dependency>

Am I having wrong dependency here? If so what are the dependencies that I
should include when do the build?

Thanks
Best Regards


2015-04-24 11:13 GMT+05:30 Thusitha Thilina Dayaratne <
thusithathil...@gmail.com>:

> Hi,
>
> > Hi,
> >
> > I've embedded tomcat 8.0.20 and using that. I build the tomcat websocket
> > example and when I'm trying to run it in my server for all 4 examples
> > (Echo, chat, etc..)
> > I'm getting
> >
> >> Info: WebSocket connection closed, Code: 1006
> >
> >
> > In the console it prints
> >
> > WebSocket connection to 'ws://
> >> 10.100.7.26:9763/examples/websocket/echoProgrammatic' failed: Error
> >> during WebSocket handshake: Unexpected response code: 302
> >
> >
> > This same war file is running perfectly on Tomcat distribution.
> >
> > Can someone tell me what could be the reason for this?
>
> >>It looks like you haven't deployed the WebSocket examples correctly. My
> >>guess is you are seeing the 302 redirect to
> >>/examples/websocket/echoProgrammatic/ you'd get if this was being
> >>handled as a static resource.
> >>Thanks for quick response. But I think you misunderstood what I mean.
> >>I'm not getting 10.100.7.26:9763/examples/websocket/echoProgrammatic'
> failed: Error during WebSocket handshake: Unexpected response code: 302
> >>I'm getting that for the echo sample programmatic API option.
>
> >>For each and every websocket sample I'm getting Info: WebSocket
> connection closed, Code: 1006
> >>And in the console it says something like
> >>WebSocket connection to ws://10.100.7.26:9763/examples/websocket/
> <http://10.100.7.26:9763/examples/websocket/echoProgrammatic>... failed:
> Error during WebSocket handshake: Unexpected response code: 302
>
> >>>When I tried to deploy the sample distributed with Tomcat it works fine
> in my server.
> >>>Seems that I did something wrong while building the sample. Can someone
> help me out?
>
> Furthermore I've tried following things out and both options works without
> issue.
>
>    1. Running tomcat distributed examples in my server
>    2. Running the war file that I built inside Tomcat
>
> The only thing that doesn't work is when try to run the war file that I
> built in my server.
>
> 2015-04-24 10:59 GMT+05:30 Thusitha Thilina Dayaratne <
> thusithathil...@gmail.com>:
>
>> Hi,
>>
>> > Hi,
>> >
>> > I've embedded tomcat 8.0.20 and using that. I build the tomcat websocket
>> > example and when I'm trying to run it in my server for all 4 examples
>> > (Echo, chat, etc..)
>> > I'm getting
>> >
>> >> Info: WebSocket connection closed, Code: 1006
>> >
>> >
>> > In the console it prints
>> >
>> > WebSocket connection to 'ws://
>> >> 10.100.7.26:9763/examples/websocket/echoProgrammatic' failed: Error
>> >> during WebSocket handshake: Unexpected response code: 302
>> >
>> >
>> > This same war file is running perfectly on Tomcat distribution.
>> >
>> > Can someone tell me what could be the reason for this?
>>
>> >>It looks like you haven't deployed the WebSocket examples correctly. My
>> >>guess is you are seeing the 302 redirect to
>> >>/examples/websocket/echoProgrammatic/ you'd get if this was being
>> >>handled as a static resource.
>> >>Thanks for quick response. But I think you misunderstood what I mean.
>> >>I'm not getting 10.100.7.26:9763/examples/websocket/echoProgrammatic'
>> failed: Error during WebSocket handshake: Unexpected response code: 302
>> >>I'm getting that for the echo sample programmatic API option.
>>
>> >>For each and every websocket sample I'm getting Info: WebSocket
>> connection closed, Code: 1006
>> >>And in the console it says something like
>> >>WebSocket connection to ws://10.100.7.26:9763/examples/websocket/
>> <http://10.100.7.26:9763/examples/websocket/echoProgrammatic>... failed:
>> Error during WebSocket handshake: Unexpected response code: 302
>>
>> When I tried to deploy the sample distributed with Tomcat it works fine
>> in my server.
>> Seems that I did something wrong while building the sample. Can someone
>> help me out?
>>
>> Thanks
>> Best Regards
>>
>> 2015-04-23 14:06 GMT+05:30 Thusitha Thilina Dayaratne <
>> thusithathil...@gmail.com>:
>>
>>> Hi
>>>
>>> > Hi,
>>> >
>>> > I've embedded tomcat 8.0.20 and using that. I build the tomcat
>>> websocket
>>> > example and when I'm trying to run it in my server for all 4 examples
>>> > (Echo, chat, etc..)
>>> > I'm getting
>>> >
>>> >> Info: WebSocket connection closed, Code: 1006
>>> >
>>> >
>>> > In the console it prints
>>> >
>>> > WebSocket connection to 'ws://
>>> >> 10.100.7.26:9763/examples/websocket/echoProgrammatic' failed: Error
>>> >> during WebSocket handshake: Unexpected response code: 302
>>> >
>>> >
>>> > This same war file is running perfectly on Tomcat distribution.
>>> >
>>> > Can someone tell me what could be the reason for this?
>>>
>>> It looks like you haven't deployed the WebSocket examples correctly. My
>>> guess is you are seeing the 302 redirect to
>>> /examples/websocket/echoProgrammatic/ you'd get if this was being
>>> handled as a static resource.
>>> Thanks for quick response. But I think you misunderstood what I mean.
>>> I'm not getting 10.100.7.26:9763/examples/websocket/echoProgrammatic'
>>> failed: Error during WebSocket handshake: Unexpected response code: 302
>>> I'm getting that for the echo sample programmatic API option.
>>>
>>> For each and every websocket sample I'm getting Info: WebSocket
>>> connection closed, Code: 1006
>>> And in the console it says something like
>>> WebSocket connection to ws://10.100.7.26:9763/examples/websocket/
>>> <http://10.100.7.26:9763/examples/websocket/echoProgrammatic>... failed:
>>> Error during WebSocket handshake: Unexpected response code: 302
>>>
>>> 2015-04-23 12:58 GMT+05:30 Mark Thomas <ma...@apache.org>:
>>>
>>>> On 23/04/2015 05:51, Thusitha Thilina Dayaratne wrote:
>>>> > Hi,
>>>> >
>>>> > I've embedded tomcat 8.0.20 and using that. I build the tomcat
>>>> websocket
>>>> > example and when I'm trying to run it in my server for all 4 examples
>>>> > (Echo, chat, etc..)
>>>> > I'm getting
>>>> >
>>>> >> Info: WebSocket connection closed, Code: 1006
>>>> >
>>>> >
>>>> > In the console it prints
>>>> >
>>>> > WebSocket connection to 'ws://
>>>> >> 10.100.7.26:9763/examples/websocket/echoProgrammatic' failed: Error
>>>> >> during WebSocket handshake: Unexpected response code: 302
>>>> >
>>>> >
>>>> > This same war file is running perfectly on Tomcat distribution.
>>>> >
>>>> > Can someone tell me what could be the reason for this?
>>>>
>>>> It looks like you haven't deployed the WebSocket examples correctly. My
>>>> guess is you are seeing the 302 redirect to
>>>> /examples/websocket/echoProgrammatic/ you'd get if this was being
>>>> handled as a static resource.
>>>>
>>>> Mark
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>>>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>>>
>>>>
>>>
>>>
>>> --
>>>
>>>
>>
>>
>>
>> --
>>
>>
>
>
>
> --
>
>



--

Reply via email to