You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Mike <To...@canam.com> on 2005/11/29 15:59:27 UTC

File Download not working for anchor tags

Hello,

I've encountered a bug with the 4.1.31 version of Tomcat. Apparently, when
I use an anchor tag for a file, and I click on the link, it does not show the
file download message "Do you want to open or save this file?" with the open
and save options. Instead, it displays the file in the browser. I know you
could normally save this information from the browser to a file, but I need it
to show the download message because it's easier for users to save their
file. I'm using Internet Explorer version 6, SP2. I've also tried setting
the "Confirm open after download" check box for file types to no avail. It
use to work in Tomcat 4.1.18.

Any help would be appreciated.

Thanks,

   Mike



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


Re: File Download not working for anchor tags

Posted by Mike <To...@canam.com>.
I  tried that for Basic, Form, Digest, NonLogin, SSL, SavedRequest, 
Constants, AuthenticatorBase and SingleSignOn authenticators, but they 
didn't work.

   Mike

At 10:55 AM 11/29/2005, you wrote:
>I had a problem with this recently and had to add the following to my Context:
><Valve className="org.apache.catalina.authenticator.BasicAuthenticator"
>disableProxyCaching="false" />
>
>There is some info on this IE bug you can google for - I lost my link to it.
>Depending on the type of authentication (Basic, form, etc.) you may have to
>modify the className.
>
>Quoting Mike <To...@canam.com>:
>
>>
>>   I tried that setContentType and fileInputStream solution, but ran into 
>> two problems.  First, when I download an Excel file and load the 
>> downloaded file in Excel, it doesn't load in properly.  I'm guessing 
>> there's some data transfer problem.  Second, the first time I try to 
>> download, IE blocks the download.  If I download it a second time, it 
>> seems to work.
>>
>>   A solution with the anchor tag would work the best if possible because 
>> the data is good, and the download is fast.
>>
>>   Mike
>>
>>At 08:07 AM 11/29/2005, you wrote:
>>>Are you doing this?
>>>http://tomcat.apache.org/faq/misc.html#saveas
>>>
>>>-Tim
>>>
>>>Mike wrote:
>>>
>>>>Hello,
>>>>I've encountered a bug with the 4.1.31 version of Tomcat. Apparently, when
>>>>I use an anchor tag for a file, and I click on the link, it does not 
>>>>show the
>>>>file download message "Do you want to open or save this file?" with the 
>>>>open
>>>>and save options. Instead, it displays the file in the browser. I know you
>>>>could normally save this information from the browser to a file, but I 
>>>>need it
>>>>to show the download message because it's easier for users to save their
>>>>file. I'm using Internet Explorer version 6, SP2. I've also tried setting
>>>>the "Confirm open after download" check box for file types to no avail. It
>>>>use to work in Tomcat 4.1.18.
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>For additional commands, e-mail: users-help@tomcat.apache.org
>>
>
>
>



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


Re: File Download not working for anchor tags

Posted by Mike <To...@canam.com>.
   I tried that setContentType and fileInputStream solution, but ran into 
two problems.  First, when I download an Excel file and load the downloaded 
file in Excel, it doesn't load in properly.  I'm guessing there's some data 
transfer problem.  Second, the first time I try to download, IE blocks the 
download.  If I download it a second time, it seems to work.

   A solution with the anchor tag would work the best if possible because 
the data is good, and the download is fast.

   Mike

At 08:07 AM 11/29/2005, you wrote:
>Are you doing this?
>http://tomcat.apache.org/faq/misc.html#saveas
>
>-Tim
>
>Mike wrote:
>
>>Hello,
>>I've encountered a bug with the 4.1.31 version of Tomcat. Apparently, when
>>I use an anchor tag for a file, and I click on the link, it does not show the
>>file download message "Do you want to open or save this file?" with the open
>>and save options. Instead, it displays the file in the browser. I know you
>>could normally save this information from the browser to a file, but I 
>>need it
>>to show the download message because it's easier for users to save their
>>file. I'm using Internet Explorer version 6, SP2. I've also tried setting
>>the "Confirm open after download" check box for file types to no avail. It
>>use to work in Tomcat 4.1.18.
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>For additional commands, e-mail: users-help@tomcat.apache.org
>
>



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


Re: File Download not working for anchor tags

Posted by Mike <To...@canam.com>.
   I'm not doing that, but I'll try it.

   Thanks,

   Mike


At 08:07 AM 11/29/2005, you wrote:
>Are you doing this?
>http://tomcat.apache.org/faq/misc.html#saveas
>
>-Tim
>
>Mike wrote:
>
>>Hello,
>>I've encountered a bug with the 4.1.31 version of Tomcat. Apparently, when
>>I use an anchor tag for a file, and I click on the link, it does not show the
>>file download message "Do you want to open or save this file?" with the open
>>and save options. Instead, it displays the file in the browser. I know you
>>could normally save this information from the browser to a file, but I 
>>need it
>>to show the download message because it's easier for users to save their
>>file. I'm using Internet Explorer version 6, SP2. I've also tried setting
>>the "Confirm open after download" check box for file types to no avail. It
>>use to work in Tomcat 4.1.18.
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>For additional commands, e-mail: users-help@tomcat.apache.org
>
>



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


Re: File Download not working for anchor tags

Posted by Tim Funk <fu...@joedog.org>.
Are you doing this?
http://tomcat.apache.org/faq/misc.html#saveas

-Tim

Mike wrote:

> Hello,
> 
> I've encountered a bug with the 4.1.31 version of Tomcat. Apparently, when
> I use an anchor tag for a file, and I click on the link, it does not 
> show the
> file download message "Do you want to open or save this file?" with the 
> open
> and save options. Instead, it displays the file in the browser. I know you
> could normally save this information from the browser to a file, but I 
> need it
> to show the download message because it's easier for users to save their
> file. I'm using Internet Explorer version 6, SP2. I've also tried setting
> the "Confirm open after download" check box for file types to no avail. It
> use to work in Tomcat 4.1.18.
> 

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