Results 1 to 2 of 2
  1. #1
    mr_anderson is offline Member
    Join Date
    May 2010
    Rep Power

    Cool Discussion About Blocking Closing Get and Post Methods in Servlet Communication

    I was developing a java application that posts the data to a Servlet (something similar to a chat room) in which the data is communicated between distributed clients all over the internet. As you know HTTP communications are not fast like socket communications especially when you have to update your client status. i.e. we all agree that you can post data from your client to the servlet whenever you want but how can you get the new data from the servlet instantaneously (almost instantaneously). I Googled the web for such stuff and found a good solution which is often used in java-based chat rooms. The solution is simple in which the servlet will block the GET/Post requests from the client i.e. the get/post timeout in the client side should be set to zero thus they willn't time out, on the servlet side the Servlet will accept the requests but will not close the connections it until it updates them with new data (i.e. to block closing the connections until it updates them with new data).
    The above is a short brief for the real implementation.
    Any way I just wanted to share this technique with you and check out your reviews, ideas, comments.
    Last edited by mr_anderson; 08-14-2011 at 06:09 PM.

  2. #2
    d0n is offline Member
    Join Date
    Aug 2011
    Rep Power

Similar Threads

  1. Servlet communication
    By narcissist in forum Java Servlet
    Replies: 4
    Last Post: 12-20-2010, 06:52 PM
  2. Need help with HTTP POST communication to desktop application (installer)
    By jeremy.wilson in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 07-17-2009, 07:19 PM
  3. Creating Blocking Methods
    By Singing Boyo in forum Advanced Java
    Replies: 5
    Last Post: 06-11-2009, 11:44 AM
  4. how can we call Logout servlet by closing window
    By nagesh1811 in forum Java Servlet
    Replies: 2
    Last Post: 07-11-2008, 08:41 AM
  5. applet servlet communication
    By hardc0d3r in forum Java Applets
    Replies: 1
    Last Post: 07-12-2007, 07:58 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts