You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Christopher Schultz <ch...@christopherschultz.net> on 2009/02/04 18:45:37 UTC

Re: Excel file in Tomcat Virtual Dir has junk data in it.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Uddav,

uddav wrote:
> I have put a .xls file in there, and when we open it - it opens in the
> browser itself and what it seems to have is junk data in it. (unreadable).
> However instead of clicking it to open, if we do "Save the target as.." and
> save it in the local machine and change the extension from .htm to .xls the
> report comes to full-life and its all good.

I'd bet the problem is newline translation. If you scp the file from the
server, does it look right? Are you using your own servlet to download
the file? If so, what does the code look like? If you MD5 hash the
original file (somewhere else) and the file uploaded to your server, do
they have the same hash? What about after downloading?

> Is there any settings in Tomcat which we can set so that instead of opening
> files in the browser itself, it would download it to the users' PC with the
> correct file extensions?

http://web.archive.org/web/20020604100834/http://www.fawcette.com/javapro/2002_03/online/online_eprods/servlets_03_08/

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkmJ1EEACgkQ9CaO5/Lv0PAmmgCgiX0UiPp+abgwECGJMHCjEJ65
tc4An3LQcp2yig0zhhkhWwYKHIn4jzxR
=uj1S
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Excel file in Tomcat Virtual Dir has junk data in it.

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Christopher Schultz [mailto:chris@christopherschultz.net]
> Subject: Re: Excel file in Tomcat Virtual Dir has junk data in it.
>
> I'd bet the problem is newline translation.

It was the MIME type - the version of Tomcat the OP was using had it wrong (known bug).

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org