RE: File Download - CSV question ****
You should have a look at the mime type definition for .csv in both installations. Alberto -Original Message- From: Dmitri Colebatch [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 24, 2001 22:11 To: Tomcat-User Subject: Re: File Download - CSV question Are you using the same client between the two servers? IE seems to consider itself more important than mimetypes, and if it sees a file extension it recognises it treats it as it deems fit, regardless of the mimetype. So one possibility is that you have just installed excel or something on the client, and IE is redirecting the download there. another option is that the mimetype being sent in tomcat 4.0 is different to 3.x, but I'm not sure about this, so will let someone else answer this option. if you outline exactly what client/server you were using before, and now, it will make the question more specific. for intsance, tc3.2 on windows with a win98 client with IE4.0 and now using tc4.0 on linux with a win2k client with IE5.0. cheers dim On Wed, 24 Oct 2001, Evan Swanson wrote: I wrote an application that for Tomcat 3.2 running on window. In the HTML the is a reference ( A HREF=/filname.csv ) to the filename. When I run this on windows I get a popup save as selection box. When I run this on Tomcat4.0 on Unix it no longer gives me the selection box but instead displays the data on the screen. Is this a difference between TC32 adn TC40 or Unix / Windows. Is this configurable. Thanks in advance.
RE: File Download - CSV question ****
On Thu, 25 Oct 2001, Evan Swanson wrote: I am using IE5.0 in both situations. The only difference is going from TC3.2 on windows to TC4.0 on HP Unix. I would think that the IE would be making the decision on how to handle the file by the extension name but it is not. technically speaking it should (and by the sounds of it is) be looking at the mime type. Is MIME type something you can configure on Tomcat? I'm not on solid ground here, so I'll let someone else answer it. I know that in $TOMCAT_HOME/conf/web.xml and $CATALINA_HOME/conf/web.xml there are mime-types listed, but I'm not sure if changing them will change the behaviour (I remember a lot of discussion about this a few months back in relation to tc3 and my memory is that the conf/web.xml is not read by the container, but I could be wrong). So if someone else with firm knowledge could answer that one we'd both be wiser (o: cheers dim -Original Message- From: Dmitri Colebatch [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 24, 2001 10:11 PM To: Tomcat-User Subject: Re: File Download - CSV question Are you using the same client between the two servers? IE seems to consider itself more important than mimetypes, and if it sees a file extension it recognises it treats it as it deems fit, regardless of the mimetype. So one possibility is that you have just installed excel or something on the client, and IE is redirecting the download there. another option is that the mimetype being sent in tomcat 4.0 is different to 3.x, but I'm not sure about this, so will let someone else answer this option. if you outline exactly what client/server you were using before, and now, it will make the question more specific. for intsance, tc3.2 on windows with a win98 client with IE4.0 and now using tc4.0 on linux with a win2k client with IE5.0. cheers dim On Wed, 24 Oct 2001, Evan Swanson wrote: I wrote an application that for Tomcat 3.2 running on window. In the HTML the is a reference ( A HREF=/filname.csv ) to the filename. When I run this on windows I get a popup save as selection box. When I run this on Tomcat4.0 on Unix it no longer gives me the selection box but instead displays the data on the screen. Is this a difference between TC32 adn TC40 or Unix / Windows. Is this configurable. Thanks in advance.
RE: File Download - CSV question ****
On Thu, 25 Oct 2001, Evan Swanson wrote: Date: Thu, 25 Oct 2001 13:22:06 -0700 From: Evan Swanson [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: '[EMAIL PROTECTED]' [EMAIL PROTECTED] Cc: 'Dmitri Colebatch' [EMAIL PROTECTED] Subject: RE: File Download - CSV question I order to reduce the variable, I tried installing TC4.0 on the same windows based machine. I am using the same client for both( IE5.0 ). Results: TC3.2 will present a popup box for downloading files with .CSV extention. TC4.0 throws data directly up on the screen. In a servlet 2.3 environment, the default content type is not allowed to be set on the download. You must declare it yourself (see below). Is there any reason for this? Can I change the configuration? Yes. Yes. Is this a MIME type problem? Yes. You can declare the appropriate content types for your files by using the mime-type declaration like this in your web.xml file: mime-mapping extensioncsv/extension mime-typeapplication/octet-stream/mime-type /mime-mapping The other important issue is what your *browser* thinks a particular file type should be. Netscape Navigator is usually pretty good about respecting the Content-Type header sent by the server, while IE tends to make its own assumptions about the file type, no matter what yo do on the server side. Craig McClanahan
RE: File Download - CSV question ****
Without being an expert on TomCat, I'd say straight away that this is a MIME error. You need to set the MIME for .csv files to something that's not parsed by the browser, like, application/x-whatever. Fiddle around with that. I think the MIMES are in the server.xml file. I could be wrong though. /Christopher Cato -Original Message- From: Evan Swanson [mailto:[EMAIL PROTECTED]] Sent: den 25 oktober 2001 22:22 To: '[EMAIL PROTECTED]' Cc: 'Dmitri Colebatch' Subject: RE: File Download - CSV question I order to reduce the variable, I tried installing TC4.0 on the same windows based machine. I am using the same client for both( IE5.0 ). Results: TC3.2 will present a popup box for downloading files with .CSV extention. TC4.0 throws data directly up on the screen. Is there any reason for this? Can I change the configuration? Is this a MIME type problem? -Original Message- From: Dmitri Colebatch [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 24, 2001 10:11 PM To: Tomcat-User Subject: Re: File Download - CSV question Are you using the same client between the two servers? IE seems to consider itself more important than mimetypes, and if it sees a file extension it recognises it treats it as it deems fit, regardless of the mimetype. So one possibility is that you have just installed excel or something on the client, and IE is redirecting the download there. another option is that the mimetype being sent in tomcat 4.0 is different to 3.x, but I'm not sure about this, so will let someone else answer this option. if you outline exactly what client/server you were using before, and now, it will make the question more specific. for intsance, tc3.2 on windows with a win98 client with IE4.0 and now using tc4.0 on linux with a win2k client with IE5.0. cheers dim On Wed, 24 Oct 2001, Evan Swanson wrote: I wrote an application that for Tomcat 3.2 running on window. In the HTML the is a reference ( A HREF=/filname.csv ) to the filename. When I run this on windows I get a popup save as selection box. When I run this on Tomcat4.0 on Unix it no longer gives me the selection box but instead displays the data on the screen. Is this a difference between TC32 adn TC40 or Unix / Windows. Is this configurable. Thanks in advance.
RE: File Download - CSV question ****
I order to reduce the variable, I tried installing TC4.0 on the same windows based machine. I am using the same client for both( IE5.0 ). Results: TC3.2 will present a popup box for downloading files with .CSV extention. TC4.0 throws data directly up on the screen. Is there any reason for this? Can I change the configuration? Is this a MIME type problem? The next question is: is it a real .csv file or is it a file generated on the fly by a servlet? CF -Original Message- From: Dmitri Colebatch [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 24, 2001 10:11 PM To: Tomcat-User Subject: Re: File Download - CSV question Are you using the same client between the two servers? IE seems to consider itself more important than mimetypes, and if it sees a file extension it recognises it treats it as it deems fit, regardless of the mimetype. So one possibility is that you have just installed excel or something on the client, and IE is redirecting the download there. another option is that the mimetype being sent in tomcat 4.0 is different to 3.x, but I'm not sure about this, so will let someone else answer this option. if you outline exactly what client/server you were using before, and now, it will make the question more specific. for intsance, tc3.2 on windows with a win98 client with IE4.0 and now using tc4.0 on linux with a win2k client with IE5.0. cheers dim On Wed, 24 Oct 2001, Evan Swanson wrote: I wrote an application that for Tomcat 3.2 running on window. In the HTML the is a reference ( A HREF=/filname.csv ) to the filename. When I run this on windows I get a popup save as selection box. When I run this on Tomcat4.0 on Unix it no longer gives me the selection box but instead displays the data on the screen. Is this a difference between TC32 adn TC40 or Unix / Windows. Is this configurable. Thanks in advance.
RE: File Download - CSV question ****
That was it! Thank you very much for your help. The WEB.XML file seems to be much different on version 4.0 very good help thanks again... -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 25, 2001 10:52 PM To: '[EMAIL PROTECTED]' Cc: 'Dmitri Colebatch' Subject: RE: File Download - CSV question On Thu, 25 Oct 2001, Evan Swanson wrote: Date: Thu, 25 Oct 2001 13:22:06 -0700 From: Evan Swanson [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: '[EMAIL PROTECTED]' [EMAIL PROTECTED] Cc: 'Dmitri Colebatch' [EMAIL PROTECTED] Subject: RE: File Download - CSV question I order to reduce the variable, I tried installing TC4.0 on the same windows based machine. I am using the same client for both( IE5.0 ). Results: TC3.2 will present a popup box for downloading files with .CSV extention. TC4.0 throws data directly up on the screen. In a servlet 2.3 environment, the default content type is not allowed to be set on the download. You must declare it yourself (see below). Is there any reason for this? Can I change the configuration? Yes. Yes. Is this a MIME type problem? Yes. You can declare the appropriate content types for your files by using the mime-type declaration like this in your web.xml file: mime-mapping extensioncsv/extension mime-typeapplication/octet-stream/mime-type /mime-mapping The other important issue is what your *browser* thinks a particular file type should be. Netscape Navigator is usually pretty good about respecting the Content-Type header sent by the server, while IE tends to make its own assumptions about the file type, no matter what yo do on the server side. Craig McClanahan
RE: File Download - CSV question ****
On Fri, 26 Oct 2001, Dmitri Colebatch wrote: Date: Fri, 26 Oct 2001 15:10:03 +1000 From: Dmitri Colebatch [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: '[EMAIL PROTECTED]' [EMAIL PROTECTED] Subject: RE: File Download - CSV question On Thu, 25 Oct 2001, Evan Swanson wrote: I am using IE5.0 in both situations. The only difference is going from TC3.2 on windows to TC4.0 on HP Unix. I would think that the IE would be making the decision on how to handle the file by the extension name but it is not. technically speaking it should (and by the sounds of it is) be looking at the mime type. Is MIME type something you can configure on Tomcat? Yes -- either in Tomcat or in your application web.xml. These MIME type settings are used by Tomcat when it serves static resources, or you can look them up yourself via ServletContext.getMimeType(). For Tomcat 4 (the technique is different on 3.x and I don't recall the details), you can set MIME types globally by modifying $TOMCAT_HOME/conf/web.xml. For all versions of Tomcat, you can define MIME types in your own web.xml file by adding mime-mapping elements. For example: mime-mapping extensionhtml/extension mime-typetext/html/mime-type /mime-mapping is how Tomcat knows what content type to set on HTML pages. To trigger a download dialog for CSV files (the original question on this thread), you need to configure a MIME type that your browser doesn't recognize -- usually application/octet-stream will work. On the other hand, you can configure things to fire off Excel automatically, as well (if your browser is set up that way) by saying something like: mime-mapping extensioncsv/extension mime-typeapplication/msexcel/mime-type /mime-mapping (Check the file types configuration in your browser to find out what the correct MIME types should be.) Craig
Re: File Download - CSV question ****
Are you using the same client between the two servers? IE seems to consider itself more important than mimetypes, and if it sees a file extension it recognises it treats it as it deems fit, regardless of the mimetype. So one possibility is that you have just installed excel or something on the client, and IE is redirecting the download there. another option is that the mimetype being sent in tomcat 4.0 is different to 3.x, but I'm not sure about this, so will let someone else answer this option. if you outline exactly what client/server you were using before, and now, it will make the question more specific. for intsance, tc3.2 on windows with a win98 client with IE4.0 and now using tc4.0 on linux with a win2k client with IE5.0. cheers dim On Wed, 24 Oct 2001, Evan Swanson wrote: I wrote an application that for Tomcat 3.2 running on window. In the HTML the is a reference ( A HREF=/filname.csv ) to the filename. When I run this on windows I get a popup save as selection box. When I run this on Tomcat4.0 on Unix it no longer gives me the selection box but instead displays the data on the screen. Is this a difference between TC32 adn TC40 or Unix / Windows. Is this configurable. Thanks in advance.
RE: **** File Download - CSV question ****
one simple thing, just try it out on ur windows machine, in browser window...location bar... write the url u r trying to open thru anchor link.. i.e. in browser window location bar : http://servername/direcorypath/filename.csv and see, if it opens up the file in browser or pops up 'save as' dialog box. If it shows u save as dialog box, then that means, your browser doesn't support interpretation/opening of that file into it. regards, Chintan -Original Message- From: Evan Swanson [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 24, 2001 9:01 PM To: '[EMAIL PROTECTED]' Subject: File Download - CSV question I wrote an application that for Tomcat 3.2 running on window. In the HTML the is a reference ( A HREF=/filname.csv ) to the filename. When I run this on windows I get a popup save as selection box. When I run this on Tomcat4.0 on Unix it no longer gives me the selection box but instead displays the data on the screen. Is this a difference between TC32 adn TC40 or Unix / Windows. Is this configurable. Thanks in advance.
RE: File Download - CSV question ****
I also believe that you can configure IE to prompt you for different file types. Filip ~ Namaste - I bow to the divine in you ~ Filip Hanik Software Architect [EMAIL PROTECTED] www.filip.net -Original Message- From: Dmitri Colebatch [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 24, 2001 10:11 PM To: Tomcat-User Subject: Re: File Download - CSV question Are you using the same client between the two servers? IE seems to consider itself more important than mimetypes, and if it sees a file extension it recognises it treats it as it deems fit, regardless of the mimetype. So one possibility is that you have just installed excel or something on the client, and IE is redirecting the download there. another option is that the mimetype being sent in tomcat 4.0 is different to 3.x, but I'm not sure about this, so will let someone else answer this option. if you outline exactly what client/server you were using before, and now, it will make the question more specific. for intsance, tc3.2 on windows with a win98 client with IE4.0 and now using tc4.0 on linux with a win2k client with IE5.0. cheers dim On Wed, 24 Oct 2001, Evan Swanson wrote: I wrote an application that for Tomcat 3.2 running on window. In the HTML the is a reference ( A HREF=/filname.csv ) to the filename. When I run this on windows I get a popup save as selection box. When I run this on Tomcat4.0 on Unix it no longer gives me the selection box but instead displays the data on the screen. Is this a difference between TC32 adn TC40 or Unix / Windows. Is this configurable. Thanks in advance.
RE: File Download - CSV question ****
Thanks for answering... That is the thing, I am using the same client in both situations. I am using IE5.0 in both situations. The only difference is going from TC3.2 on windows to TC4.0 on HP Unix. I would think that the IE would be making the decision on how to handle the file by the extension name but it is not. Is MIME type something you can configure on Tomcat? -Original Message- From: Dmitri Colebatch [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 24, 2001 10:11 PM To: Tomcat-User Subject: Re: File Download - CSV question Are you using the same client between the two servers? IE seems to consider itself more important than mimetypes, and if it sees a file extension it recognises it treats it as it deems fit, regardless of the mimetype. So one possibility is that you have just installed excel or something on the client, and IE is redirecting the download there. another option is that the mimetype being sent in tomcat 4.0 is different to 3.x, but I'm not sure about this, so will let someone else answer this option. if you outline exactly what client/server you were using before, and now, it will make the question more specific. for intsance, tc3.2 on windows with a win98 client with IE4.0 and now using tc4.0 on linux with a win2k client with IE5.0. cheers dim On Wed, 24 Oct 2001, Evan Swanson wrote: I wrote an application that for Tomcat 3.2 running on window. In the HTML the is a reference ( A HREF=/filname.csv ) to the filename. When I run this on windows I get a popup save as selection box. When I run this on Tomcat4.0 on Unix it no longer gives me the selection box but instead displays the data on the screen. Is this a difference between TC32 adn TC40 or Unix / Windows. Is this configurable. Thanks in advance.
RE: File Download - CSV question ****
I order to reduce the variable, I tried installing TC4.0 on the same windows based machine. I am using the same client for both( IE5.0 ). Results: TC3.2 will present a popup box for downloading files with .CSV extention. TC4.0 throws data directly up on the screen. Is there any reason for this? Can I change the configuration? Is this a MIME type problem? -Original Message- From: Dmitri Colebatch [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 24, 2001 10:11 PM To: Tomcat-User Subject: Re: File Download - CSV question Are you using the same client between the two servers? IE seems to consider itself more important than mimetypes, and if it sees a file extension it recognises it treats it as it deems fit, regardless of the mimetype. So one possibility is that you have just installed excel or something on the client, and IE is redirecting the download there. another option is that the mimetype being sent in tomcat 4.0 is different to 3.x, but I'm not sure about this, so will let someone else answer this option. if you outline exactly what client/server you were using before, and now, it will make the question more specific. for intsance, tc3.2 on windows with a win98 client with IE4.0 and now using tc4.0 on linux with a win2k client with IE5.0. cheers dim On Wed, 24 Oct 2001, Evan Swanson wrote: I wrote an application that for Tomcat 3.2 running on window. In the HTML the is a reference ( A HREF=/filname.csv ) to the filename. When I run this on windows I get a popup save as selection box. When I run this on Tomcat4.0 on Unix it no longer gives me the selection box but instead displays the data on the screen. Is this a difference between TC32 adn TC40 or Unix / Windows. Is this configurable. Thanks in advance.