You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Dobson Paul L Contr OO-ALC/LGFBR <Pa...@HILL.af.mil> on 2004/11/02 18:11:24 UTC

SSL on tomcat breaks file download

I created a JSP web application that allows user to dynamically generate and
download excel files using POI/HSSF. I use the following lines to store the
excel file in my application directory under a directory titled
"xlsreports":

 

nextXLSName =  MiscUtil.getNextXLSName(); //gets the next file name by
querying the database.

report.writeFile(WebappPrefs.getRptPath(session.getServletContext()) +
nextXLSName);

 

 

The above lines seem to work because I find the generated file in the
correct folder with the correct time stamp of when I tested the JSP.

 

I then use the following line of code to send the user the file:

 

<jsp:forward page="<%= \"xlsreports/\" + nextXLSName %>" />

 

 

This has always worked flawlessly until I implemented SSL on Tomcat. Now, IE
tells me that the requested site is either unavailable or cannot be found.

 

Any ideas why implementing SSL would break this or how to fix it?  Thanks a
million in advance.

 

--Paul

 

 


Re: SSL on tomcat breaks file download

Posted by Edouard Dalla-Costa <ed...@gmail.com>.
hey,

it is simply an header problem. I encountered the same problem few
month except that I am using servlet and not JSP file. But I think it
should be exactly the same. Tomcat by default set Cache-Control and
Pragma to no-cache. So you have to force those to to cache. I had to
add those two line to my servlet:

    response.setHeader( "Cache-Control", "cache" );
    response.setHeader( "Pragma",        "cache" );

I hope it will help you

Doud

On Tue, 02 Nov 2004 17:32:21 +0000, Jon Wingfield
<jo...@mkodo.com> wrote:
> Archives:
> http://marc.theaimsgroup.com/?l=tomcat-user&m=109818070801385&w=2
> http://marc.theaimsgroup.com/?l=tomcat-user&m=105966032518910&w=2
> 
> Jon
> 
> 
> 
> Dobson Paul L Contr OO-ALC/LGFBR wrote:
> 
> >
> >
> > I created a JSP web application that allows user to dynamically generate
> > and download excel files using POI/HSSF. I use the following lines to
> > store the excel file in my application directory under a directory
> > titled "xlsreports":
> >
> >
> >
> > nextXLSName =  MiscUtil.getNextXLSName(); //gets the next file name by
> > querying the database.
> >
> > report.writeFile(WebappPrefs.getRptPath(session.getServletContext()) +
> > nextXLSName);
> >
> >
> >
> >
> >
> > The above lines seem to work because I find the generated file in the
> > correct folder with the correct time stamp of when I tested the JSP.
> >
> >
> >
> > I then use the following line of code to send the user the file:
> >
> >
> >
> > <jsp:forward page="<%= \"xlsreports/\" + nextXLSName %>" />
> >
> >
> >
> >
> >
> > This has always worked flawlessly until I implemented SSL on Tomcat.
> > Now, IE tells me that the requested site is either unavailable or cannot
> > be found.
> >
> >
> >
> > Any ideas why implementing SSL would break this or how to fix it?
> > Thanks a million in advance.
> >
> >
> >
> > --Paul
> >
> >
> >
> >
> >
> > 
> > ------------------------------------------------------------------------
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
>

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


Re: SSL on tomcat breaks file download

Posted by Jon Wingfield <jo...@mkodo.com>.
Archives:
http://marc.theaimsgroup.com/?l=tomcat-user&m=109818070801385&w=2
http://marc.theaimsgroup.com/?l=tomcat-user&m=105966032518910&w=2

Jon

Dobson Paul L Contr OO-ALC/LGFBR wrote:

> 
> 
> I created a JSP web application that allows user to dynamically generate 
> and download excel files using POI/HSSF. I use the following lines to 
> store the excel file in my application directory under a directory 
> titled "xlsreports":
> 
>  
> 
> nextXLSName =  MiscUtil.getNextXLSName(); //gets the next file name by 
> querying the database.
> 
> report.writeFile(WebappPrefs.getRptPath(session.getServletContext()) + 
> nextXLSName);
> 
>  
> 
>  
> 
> The above lines seem to work because I find the generated file in the 
> correct folder with the correct time stamp of when I tested the JSP.
> 
>  
> 
> I then use the following line of code to send the user the file:
> 
>  
> 
> <jsp:forward page="<%= \"xlsreports/\" + nextXLSName %>" />
> 
>  
> 
>  
> 
> This has always worked flawlessly until I implemented SSL on Tomcat. 
> Now, IE tells me that the requested site is either unavailable or cannot 
> be found.
> 
>  
> 
> Any ideas why implementing SSL would break this or how to fix it?  
> Thanks a million in advance.
> 
>  
> 
> --Paul
> 
>  
> 
>  
> 
> 
> ------------------------------------------------------------------------
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org



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