Thanks for your help. I resolved the problem \o/ . Thanks, thanks!
--------------------------------------------------------------------------------------------------
"Se um dia tiver que escolher entre o mundo e o amor... Lembre-se:
Se escolher o mundo, ficará sem o amor, mas se escolher o amor,
com ele conquistará o mundo." (Albert Einstein)
╔════════════════════════════════════════╗
ROMERYTO VIEIRA LIRA
Bacharelando em Ciência da Computação - UFCG
Membro do SegHidro2 - LSD - http://seghidro.lsd.ufcg.edu.br
Membro do Grupo de Suporte Guardians - www.lcc.ufcg.edu.br
Página Pessoal: http://romeryto.googlepages.com
Blog: http://olhartecnologico.blogspot.com
╚════════════════════════════════════════╝
Pensou em imprimir este e-mail? Isto é mesmo necessário? Poupe o meio
ambiente.
----------------------------------------------------------------------------------------------------------------------------
2008/11/21 Nicolas Chalon <[EMAIL PROTECTED]>
> Hi,
>
>
> Could you try whith something like :
>
> OutputStream out = response.getOutputStream();
> ZipOutputStream zout = new ZipOutputStream(out);
> response.setHeader("Content-Disposition", "attachment;filename=\"" +
> fileName + "\";");
> response.setContentType("application/zip");
> *...*
>
> zout.close();
> out.flush();
> out.close();
>
>
> 2008/11/21 Romeryto Lira <[EMAIL PROTECTED]>
>
> Hi,
>>
>> I have the same mistake previous after deployment on tomcat. When I commented
>> the line that close ZipOutPutStream, the download of file don't ocurr
>> correctly,
>> the file is corrupted. I uncommented the line, but the previous error
>> continue, the mime type of zip file is lost.
>>
>> How to resolve this problem?
>>
>> Thanks!
>>
>> --------------------------------------------------------------------------------------------------
>> "Se um dia tiver que escolher entre o mundo e o amor... Lembre-se:
>> Se escolher o mundo, ficará sem o amor, mas se escolher o amor,
>> com ele conquistará o mundo." (Albert Einstein)
>> ╔════════════════════════════════════════╗
>> ROMERYTO VIEIRA LIRA
>> Bacharelando em Ciência da Computação - UFCG
>> Membro do SegHidro2 - LSD - http://seghidro.lsd.ufcg.edu.br
>> Membro do Grupo de Suporte Guardians - www.lcc.ufcg.edu.br
>> Página Pessoal: http://romeryto.googlepages.com
>> Blog: http://olhartecnologico.blogspot.com
>> ╚════════════════════════════════════════╝
>>
>> Pensou em imprimir este e-mail? Isto é mesmo necessário? Poupe o meio
>> ambiente.
>>
>> ----------------------------------------------------------------------------------------------------------------------------
>>
>>
>> 2008/11/13 Romeryto Lira <[EMAIL PROTECTED]>
>>
>> Thanks for your help. I resolved the problem with your suggestion.
>>>
>>> --------------------------------------------------------------------------------------------------
>>> "Se um dia tiver que escolher entre o mundo e o amor... Lembre-se:
>>> Se escolher o mundo, ficará sem o amor, mas se escolher o amor,
>>> com ele conquistará o mundo." (Albert Einstein)
>>> ╔════════════════════════════════════════╗
>>> ROMERYTO VIEIRA LIRA
>>> Bacharelando em Ciência da Computação - UFCG
>>> Membro do SegHidro2 - LSD - http://seghidro.lsd.ufcg.edu.br
>>> Membro do Grupo de Suporte Guardians - www.lcc.ufcg.edu.br
>>> Página Pessoal: http://romeryto.googlepages.com
>>> Blog: http://olhartecnologico.blogspot.com
>>> ╚════════════════════════════════════════╝
>>>
>>> Pensou em imprimir este e-mail? Isto é mesmo necessário? Poupe o meio
>>> ambiente.
>>>
>>> ----------------------------------------------------------------------------------------------------------------------------
>>>
>>>
>>> 2008/11/12 Nicolas Chalon <[EMAIL PROTECTED]>
>>>
>>> Hi,
>>>>
>>>> In fact, in think that the problem comes from the way you close the
>>>> outputstream. When you call zout.close(), the *close *method will call
>>>> the underlying outputstream *close *method too and the reply will be
>>>> sent to the client at that stage instead of when you call out.close(). you
>>>> should try removing your zout.close() call and it should work.
>>>>
>>>> Regards
>>>>
>>>> Nicolas
>>>>
>>>> PS: Sorry if my english is not perfect, i am not an english native
>>>> speaker.
>>>>
>>>> 2008/11/11 Romeryto Lira <[EMAIL PROTECTED]>
>>>>
>>>> I have problem with my zip download servlet. When I go to download, in
>>>>> the window that open the mime tipe of the zip file is lost.
>>>>>
>>>>> *snippet of code:
>>>>>
>>>>> *String fileName = request.getParameter("filename");
>>>>>
>>>>> OutputStream out = response.getOutputStream();
>>>>> ZipOutputStream zout = new ZipOutputStream(out);
>>>>> *...*
>>>>>
>>>>> zout.close();
>>>>> response.setHeader("Content-Disposition", "attachment;filename=\"" +
>>>>> fileName + "\";");
>>>>> response.setContentType("application/zip");
>>>>> out.flush();
>>>>> out.close();
>>>>>
>>>>> I mute the response to mime type "zip" but in download the file name
>>>>> and mime types are lost.
>>>>> In xml MyApplication.gwt.xml the servlet is declared like this:
>>>>>
>>>>> <servlet path="/zipdownload"
>>>>> class="myapplication.server.files.MyZipFileServlet" />
>>>>>
>>>>> How to resolve this problem?
>>>>>
>>>>> Thanks!
>>>>>
>>>>> Ps.: The error's picture is attached.
>>>>>
>>>>> --------------------------------------------------------------------------------------------------
>>>>> "Se um dia tiver que escolher entre o mundo e o amor... Lembre-se:
>>>>> Se escolher o mundo, ficará sem o amor, mas se escolher o amor,
>>>>> com ele conquistará o mundo." (Albert Einstein)
>>>>> ╔════════════════════════════════════════╗
>>>>> ROMERYTO VIEIRA LIRA
>>>>> Bacharelando em Ciência da Computação - UFCG
>>>>> Membro do SegHidro2 - LSD - http://seghidro.lsd.ufcg.edu.br
>>>>> Membro do Grupo de Suporte Guardians - www.lcc.ufcg.edu.br
>>>>> Página Pessoal: http://romeryto.googlepages.com
>>>>> Blog: http://olhartecnologico.blogspot.com
>>>>> ╚════════════════════════════════════════╝
>>>>>
>>>>> Pensou em imprimir este e-mail? Isto é mesmo necessário? Poupe o meio
>>>>> ambiente.
>>>>>
>>>>> ----------------------------------------------------------------------------------------------------------------------------
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Nicolas CHALON
>>>> [EMAIL PROTECTED]
>>>>
>>>>
>>>>
>>>
>>
>>
>>
>
>
> --
> Nicolas CHALON
> [EMAIL PROTECTED]
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"GWT-Ext Developer Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/gwt-ext?hl=en
-~----------~----~----~----~------~----~------~--~---