Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

InputStream read() blocking

 
James Hodgkiss
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For a particular customer, our applet is sometimes failing to connect to our servlet.

The applet gets to the inputStream.read(); line and just blocks - seemingly waiting for the first byte of data that never comes. I am using standard applet and servlet connection code (applet POSTs a text/plain String in UTF8 and the servlet returns a text/plain String in UTF8).

Anyone else had this problem or know what the cause/solution might be?

Cheers,
James

NB - The url the applet is calling can be successfully called directly from the customer's browser. And I am unable to reproduce the applet's behaviour at our end.
 
James Hodgkiss
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Problem seems to be that my servlet was using a Writer to do its output rather than an OutputStream.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic