Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7503509
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T21:14:56+00:00 2026-05-29T21:14:56+00:00

I am trying to make tic tac toe using websockets running on glassfish. I’ve

  • 0

I am trying to make tic tac toe using websockets running on glassfish. I’ve download this example form git. Firstly, I want to test it, so I run it as a normal java process on my machine. I also made a tiny change to the tictacto.js

  if (typeof MozWebSocket != "undefined") { // (window.MozWebSocket)
    appType = "Mozilla";
  } else if (window.WebSocket) {
    appType = "Chrome";
  } else {
    alert('ERROR: This browser does not support WebSockets');
  }

and then

    if (appType == "Mozilla") {
     ws = new MozWebSocket(WEBSOCKET_URL);
     //alert('MozWebSocket');
   } else {
     ws = new WebSocket(WEBSOCKET_URL);
     //alert('WebSocket');
   }

When I open the test page with FF 10.0 the event onclose is only invoked and I get the status “The WebSocket Connection Has Been Closed.” then I open the test page with Chrome 17.0.963.46 m. The status is also “The WebSocket….” but server throws an exception.

run:
TicTacToe Server: Listening on port 9000
java.io.IOException: An established connection was aborted by the software in your host machine
    at sun.nio.ch.SocketDispatcher.read0(Native Method)
    at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:43)
    at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:218)
    at sun.nio.ch.IOUtil.read(IOUtil.java:186)
    at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:359)
    at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:323)
    at org.jboss.netty.channel.socket.nio.NioWorker.processSelectedKeys(NioWorker.java:282)
    at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:202)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:722)

What is the cause? I though about a few possilbe issues:

  • I use Netty 3.2.6.Final from JBoss repository. It could use different standard of websockets than the browsers.
  • running it as a java process on my machine istead as a webserver. But Netty doesn’t have any dependencies that would require it.
  • Wrong locations. var WEBSOCKET_URL = “ws://localhost:9000/websocket”; and html location is C:…web\kolo\src\main\webapp\t.html

I am using Netbeans 7.1 and glassfish 3.1

Fixed project can be found https://github.com/lukasz-madon/Tic-Tac-Toe-with-WebSocket

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T21:14:59+00:00Added an answer on May 29, 2026 at 9:14 pm

    I could be the web socket version. Here’s a table of web socket versions and which browser supports which.

    From memory, 3.2.6 only supported HyBi-00.

    Try Netty 3.3. It supports a number of versions.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was trying to make Tic Tac Toe game for the monthly tutorial and
I have read a book and am trying to make a game of tic-tac-toe
I am trying to make a really simple Tic-Tac-Toe game. I have stored values
Trying to make a Grid Like this using java and I'm assuming a 2d
Trying to make a custom :confirm message for a rails form that returns data
im trying make one replace in string from a array but this dont work
I'm trying make my first python app. I want make simple email sender form.
Trying to make this simple applet - the first part just creates a simple
Trying to make my own contact form with php. Is there a better/cleaner way
Trying to make my project using storyboard. I changed my info.plist and added entry

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.