This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
Hello , I am trying to develop a simple Net game , wherin two users can LogIn and play against each other. I have decided to use Servlets for this project. The probelem is : When one user makes certain moves on his screen the same has to be reflected to the other user as well, without the other user(or client) sending a request.How do we achieve that ? Morever should i use anything other than Servlet for this ? Thanx in advance, Milan
I have a similar problem = refresh a page without the client making the explicit request to do so. I am now using Jason Hunter's "Java Servlet Programming" O'Reilly Publisher. In Chapter 6:Sending MultiMedia Content, he describes 2 methods: 1)[Client pull] "the client uses the Refresh header value sent by the server to determine when to perform its update". He recommends this when the updates are infrequent or occur at known time intervals. 2)[Server push] Jason recommends this approach for "limited-length animations and for real-time updates". There is some example code. There is also an example chat server in Chapter 6:Applet-Servlet Communications. These two examples show two different ways for server push. see the following: http://www.oreilly.com/catalog/jservlet/