Hey Mark,

Thanks for replying,  details are:

1. I am finding following things in the "Network" tab in chrome.
    a. General:

    Request URL:wss://localhost:8443/call
    Request Method:GET
    Status Code:404


    b. Response Header:

    HTTP/1.1 404
    Content-Type: text/html;charset=utf-8
    Content-Language: en
    Content-Length: 994
    Date: Wed, 29 Mar 2017 10:54:46 GMT

    c. Request Header:

    GET wss://localhost:8443/call HTTP/1.1
    Host: localhost:8443
    Connection: Upgrade
    Pragma: no-cache
    Cache-Control: no-cache
    Upgrade: websocket
    Origin: https://localhost:8443
    Sec-WebSocket-Version: 13
    User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64)
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87   Safari/537.36
    Accept-Encoding: gzip, deflate, sdch, br
    Accept-Language: en-US,en;q=0.8
    Sec-WebSocket-Key: 7QJCsfHPo++Q6d1L/MydLg==
    Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits

2. Tomcat Logging:
    In conf/logging.properties I added following things.

    handlers = 1catalina.org.apache.juli.AsyncFileHandler,
2localhost.org.apache.juli.AsyncFileHandler,
3manager.org.apache.juli.AsyncFileHandler,
4host-manager.org.apache.juli.AsyncFileHandler,
5websocket.org.apache.juli.AsyncFileHandler,
java.util.logging.ConsoleHandler


    5websocket.org.apache.juli.AsyncFileHandler.level = TRACE
    5websocket.org.apache.juli.AsyncFileHandler.directory =
${catalina.base}/logs
    5websocket.org.apache.juli.AsyncFileHandler.prefix = WEBSOCKET.

    org.apache.tomcat.websocket.server.level = FINE

3. About endpoints:

    I have an application where I have integrated Spring + Spring MVC +
Spring Security + Spring websocket.
    Spring websocket class TextWebSocketHandler is extended and using it
for communication between server and client.

    client side using simple JavaScript based WebSocket instance which
takes a single url as an argument.

    The url is wss://localhost:8443/call. I have register this "/call" by
overriding a method from WebSocketConfigurer.java as
     shown below

         @Override
        public void registerWebSocketHandlers(WebSocketHandlerRegistry
registry) {
            registry.addHandler(callHandler(),
"/call").setAllowedOrigins("*");
        }

Regards
Addy

On Wed, Mar 29, 2017 at 3:32 PM, Mark Thomas <ma...@apache.org> wrote:

> On 29/03/17 10:17, Addy D wrote:
> > Hello all,
> >
> > I am facing an issue in my application, I want to know following things.
> >
> > 1. The tomcat is returning 404 for upgrade header (request to upgrade to
> > websocket protocol). Do I need to configure anything here?
>
> It certainly looks like it. What URL are you sending the upgrade request
> to?
>
> > 2. How to enable logging for particular package of tomcat ? (I tried
> > changing logging.properties, added new logger over there but didn't
> work).
>
> What did you try adding?
>
> > 3. How can I see, registered websocket endpoints, which are registered by
> > my application?
>
> Not easily. We need to think about adding some debug logging and/or JMX
> information for this.
>
> How have you deployed your WebSocket endpoints?
>
> Mark
>
>
> >
> > P.S I have configured my tomcat to support https, below is the line which
> > is used to configure https.
> >
> > "    <Connector SSLEnabled="true" clientAuth="false"
> > keystoreFile="D:\Servers\tomcat-8.5.9\keystore.jks"
> keystorePass="password"
> > maxThreads="150" port="8443"
> > protocol="org.apache.coyote.http11.Http11NioProtocol" scheme="https"
> > secure="true" sslProtocol="TLS"/>   "
> >
> >
> > I am stuck at these places, I need a direction, it would be nice if
> anyone
> > can help me.
> >
> > Thanks & Regards
> > Addy
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

Reply via email to