IntelliJ Java IDE
The moose likes I/O and Streams and the fly likes WebApplicationException thrown when trying to stream download file Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » I/O and Streams
Reply Bookmark "WebApplicationException thrown when trying to stream download file" Watch "WebApplicationException thrown when trying to stream download file" New topic
Author

WebApplicationException thrown when trying to stream download file

Pauline McCall
Greenhorn

Joined: Nov 10, 2011
Posts: 2
I am accessing a URL that downloads an xls file. I had code that saved it first, then streamed it to the user via Desktop.getDesktop().open(file);

However, I now would prefer to do it in the one step, access the file and stream it straight to the user. I have updated my code but everytime it downloads the file, I get this output:
WARN o.a.c.j.i.WebApplicationExceptionMapper - WebApplicationException has been caught : no cause is available

This is my code:
 
IntelliJ Java IDE
 
subject: WebApplicationException thrown when trying to stream download file
 
Threads others viewed
OOM
Java program to Login a website using url and to download a file
SocketException:socket closed
How to tell JVM to wait for the Stream?
Saving gif file from inputstream
developer file tools