title: websocket code not working on Prod Tomcat Server - 404 Error
body: <p>I am trying to run my first websocket app and refered <a href="https://dzone.com/articles/sample-java-web-socket-client" rel="nofollow">this link to get some sample code</a> . I simply created <code>CustomEndPoint</code> , <code>WSClient</code> class , html file and then ran it on netbeans IDE and it was working like a charm. </p>
  
  <p>I tried to deploy it on tomcat server whose url is accessible using <code>https</code> by changing <code>ws://</code> with <code>wss://</code> and it worked on my dev environment but when I deployed the same code on Production env its throwing below error in console:</p>
  
  <blockquote>
    <p>WebSocket connection to 'wss://xxxxxx-xxx.xxxx.<strong>com</strong>/websoc/ratesrv' failed: Error during WebSocket handshake: Unexpected response code: 404</p>
  </blockquote>
  
  <p>For dev environment I below WS call is working :</p>
  
  <p><code>wsocket = new WebSocket("wss://dev_ip:8443/websoc/ratesrv");</code></p>
  
  <p>For Prod I am using(note the <em>.com</em> in url):</p>
  
  <p><code>wss://xxxxx-xxxxx.xx.com/websoc/ratesrv</code></p>
  
  <p>Do I need to explicitly provide the port number as well in PROD ?</p>