aspose file tools*
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 | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » I/O and Streams
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:
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: WebApplicationException thrown when trying to stream download file