• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

trying to post from servlet to web server

 
Ray Smilgius
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
here is the scenerio
client(browser) makes a post to servlet then I need to repost that to a remote web server on another machine.
I am getting unexpected end of file from web server
according to my web server it records to posts with the same time stamp it is a basic echo server it works find from browser to web server returns thye posted data in the browser but when i call the servlet with the post it records to posts on the server with the same time stamp. I use url connection inside of the doPost and I also tryed it in the doGet().. Any ideas would be greatly appreciated
Thanks Ray
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13064
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. Be sure you set the Content-Length and Content-Type when POSTing.
2. Do not close the output stream, just flush it.
WBB
------------------
author of:
 
Ray Smilgius
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I will try this at work tomorrow.
Thanks Alot Bill
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic