Hello,
I'm coding a Struts 1.2 action to download file available on the server. I
need to send back the file as inline so that the browser will process it
within the same window.
the relevant code is :
response.setContentType("application/java-archive");
response.setHeader("Content-disposition", "inline; filename=file.jar");
However, when I try accessing the URL the Apache http client give the
following response:
HTTP/1.1 200 OK
Response content length: -1
Content-Type = application/java-archive
With length -1.
Any suggestion on how could I do this? It's essential that the jar file is
processed within the browser window, as the file incorporates an XUL (XML
file) that needs automatically be processed by Firefox.
Many thanks,
Dan