0

From a form in JSP I'm doing HTTP POST to a server and in return the server sends a text file to save, which results in browser opening "Save as" dialog. I want to capture the data stream through code instead of requiring the user to 'save the file'. Basically, I need to consume the content of file through java code and this should be transparent to the user.

I tried reading the request inputstream, but there is no content in it.

RRM
  • 2,340
  • 22
  • 36

1 Answers1

2

Maybe I misunderstood you, but I think you need a java.applet.Applet. In that case, you need to use java.net.URLConnection to do the POST request. Next, save the stream to file.

Community
  • 1
  • 1
Paul Vargas
  • 38,878
  • 15
  • 91
  • 139
  • well, I didn't use the Applet class, but using HttpClient I could process the response data. – RRM Jun 21 '14 at 14:45