be coool ...,
in fact i didn't that before download or upload
it is new dev , that is why ...(all we begin by this step, it was the case
for you i suppose...),
furtheremore, i resolved it => (so don't think that i'm waiting response
...)

those who are interested , here is the code i added at the begin :

String mimetype = context.getMimeType(filePath
                    .replaceAll("/", "//"));
            response.setContentType((mimetype != null) ? mimetype
                    : "application/octet-stream");
            response.setContentLength((int) file.length());
            response.setHeader("Content-Disposition", "attachment;
filename=\""
                    + filePath.replaceAll("/", "//") + "\"");

Regards
Elyes





2008/12/17 Robert Graf-Waczenski <r...@lsoft.com>

> elyes sallem wrote:
>
>> it forwarded me to page with "unreadable data"
>> comapred to the first example, you omit the
>> resp.setHeader("Content-Disposition", ...
>>
>>
>
> Sorry if this sounds a bit harsh, but the people on this list are not here
> to solve any single Java or Servlet-API related mystery for you. Of course i
> did not supply a fully functional implementation of a doGet() method that
> would give you what you want. In one message i gave you a rough sketch of
> how a typical doGet() method for a download link would look like. Since this
> was not enough and you needed help in how to copy the data from a file on
> your server's disk into the response output stream, i gave you an example
> how to accomplish this. Now you have trouble combining the two parts into a
> working solution. I don't think that we can help you any further on such a
> low level, you'll have to try to figure it out yourself and learn from it.
>
> Robert
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


-- 
Elyes.

Reply via email to