Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

HTTP Response from a ServerSocket  RSS feed

 
Sowmya Karmali
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a client that sends HTTP a request to a server. This server is a ServerSocket. I use the HTTPUrlConnection class to connect to the url where the ServerSocket is listening ( http://localhost:12299 ). I send my POST request ( containing an XML.. can I do this??)using the outputstream of the HTTPUrlConnection. Since it is HTTP, I also do a getInputStream on the connection. On the server side, I only seem to be getting the header info ( as a raw stream). I have a feeling that the getInputStream is blocking somewhere, bcos if I forcefully terminate the client (HTTP) the XML reaches the server (ServerSocket).
Anybody enlighten me on this... please
Regards,
Sowmya.

 
Val Dra
Ranch Hand
Posts: 439
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
interesting , when sending data you need to include \n at the end of it otherwise thereis no ending of a line , i had a problem like that before . maybe this is the case with you.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!