I originally tried this, but it became a pain because I didn't support
'Range' requests which sent the whole file(in my case 50MB) for each request
when someone used a download manager. 

A filter on the actual file is much more efficient since Tomcat can serve
the file when it needs to and it gets redirected when you want it to.

Charlie

> -----Original Message-----
> From: Turner, John [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 11, 2002 12:46 PM
> To: 'Tomcat Users List'
> Subject: RE: How to hide a download file
> 
> 
> 
> Off the top of my head, couldn't you "pipe" together a 
> FileInputStream and a
> ServletOutputStream ?
> 
> Something like:
> 
> - open input stream
> - open output stream to browser
> - read in file, piping it to output stream
> - close file stream
> - close servlet stream
> 
> The user would never know where the file is on the server, it could be
> anywhere.  You'd have to make sure you passed the right 
> content header to
> the browser, so the browser would know what to do with the data it was
> getting back.
> 
> Just brainstorming, it may not work.
> 
> John Turner
> [EMAIL PROTECTED]
> 
> 
> -----Original Message-----
> From: Kevin Passey [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 11, 2002 12:24 PM
> To: Tomcat Users List (E-mail)
> Subject: How to hide a download file
> 
> 
> Hi all,
> 
> I need to pick your brains again.
> 
> I need to publish a site that requires a user to fill in a form before
> displaying a download link.
> 
> What I need to do is to hide the file to be downloaded so 
> that it cannot be
> downloaded without the form being filled in - i.e it can only 
> be downloaded
> from a particular generated JSP page.
> 
> Can I do this with Tomcat?
> 
> Thanks in advance.
> 
> 
> Kevin 
> 
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 
> --
> To unsubscribe, e-mail:   
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to