RE: Excel file in Tomcat Virtual Dir has junk data in it.
> From: Christopher Schultz [mailto:ch...@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-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
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-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Excel file in Tomcat Virtual Dir has junk data in it.
Gregor Schneider wrote: Server version: Apache Tomcat/6.0.18 Server built: Jul 22 2008 02:00:36 Server number: 6.0.18.0 xls application/vnd.ms-excel Which by the way, dear OP, is exactly the same as the one I posted for you yesterday, along with the reason why. That one was from a Tomcat 5.5.x. just because your paranoid, doesn't mean they're not after you... - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Excel file in Tomcat Virtual Dir has junk data in it.
Server version: Apache Tomcat/6.0.18 Server built: Jul 22 2008 02:00:36 Server number: 6.0.18.0 xls application/vnd.ms-excel hth Gregor -- just because your paranoid, doesn't mean they're not after you... gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2 gpgp-key available @ http://pgpkeys.pca.dfn.de:11371 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Excel file in Tomcat Virtual Dir has junk data in it.
> From: uddav [mailto:adi.upr...@gmail.com] > Subject: Re: Excel file in Tomcat Virtual Dir has junk data in it. > > It is Version 5.0.27. Which is no longer supported. I do seem to recall that the settings for .xls were incorrect in that version. If you can't upgrade to a supported Tomcat, at least download one and compare your mappings in conf/web.xml with the current ones. - 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-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Excel file in Tomcat Virtual Dir has junk data in it.
It is Version 5.0.27. uddav wrote: > > Hello Everyone, > > I have set up a Virtual Directory (Directory Listing) in Tomcat. We use > this to distribute documents and reports. The way we do is put the > documents to be distributed in this directory on the server and all our > user go to this virtual directory by accessing a URL and view/get their > reports. > > 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. > > We used to have similar virtual directory in Apache before. I remember > that if we clicked on the .xls report, instead of opening it in the > browser, it would begin downloading it to the local machine as an Excel > file, so that was very good. > > 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? > > Any insight and recommendations in this regard would be greatly > appreciated. > > Thanks in Advance > Uddav > > > -- View this message in context: http://www.nabble.com/Excel-file-in-Tomcat-Virtual-Dir-has-junk-data-in-it.-tp21737355p21750042.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Excel file in Tomcat Virtual Dir has junk data in it.
uddav wrote: [...] In the "conf" directory of your Tomcat installation is a file called web.xml. That file contains a section which tells Tomcat about the correspondence between file extensions and their "mime type". Check if it contains a section like this one : xls application/vnd.ms-excel If not, add it, restart Tomcat and retry. When Tomcat (like other webservers) sends data to a browser, it tells it what kind of data this is, via a HTTP header sent along with the data. The browser should normally accept this information, and handle the received data accordingly. Now, if the browser you are using is Internet Explorer, it is possible that even when the webserver tells it what kind of file it is sending (like "application/vnd.ms-excel" above), IE in it's wisdom might do its own check and decide otherwise. I would not be surprised if even for an Excel file it got it wrong. In that case, you might want to try the same link with Firefox, just to check. There also exist tools, for IE and Firefox, which allow you to see exactly what the server is sending to the browser in terms of "description of the file". If your problem persists, you might want to use one of those to find out for sure. Firefox : LiveHttpHeader add-on IE : Fiddler2 (search Google) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Excel file in Tomcat Virtual Dir has junk data in it.
> From: uddav [mailto:adi.upr...@gmail.com] > Subject: Excel file in Tomcat Virtual Dir has junk data in it. > > I have set up a Virtual Directory (Directory Listing) > in Tomcat. How? While you're at it, you might want to tell us what version of Tomcat you're using, and perhaps the JVM vendor and level, and maybe the platform you're running on. Since you didn't bother to tell us that, one can only speculate that the entries in conf/web.xml are not correct. - 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-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Excel file in Tomcat Virtual Dir has junk data in it.
Hello Everyone, I have set up a Virtual Directory (Directory Listing) in Tomcat. We use this to distribute documents and reports. The way we do is put the documents to be distributed in this directory on the server and all our user go to this virtual directory by accessing a URL and view/get their reports. 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. We used to have similar virtual directory in Apache before. I remember that if we clicked on the .xls report, instead of opening it in the browser, it would begin downloading it to the local machine as an Excel file, so that was very good. 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? Any insight and recommendations in this regard would be greatly appreciated. Thanks in Advance Uddav -- View this message in context: http://www.nabble.com/Excel-file-in-Tomcat-Virtual-Dir-has-junk-data-in-it.-tp21737355p21737355.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org