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]>

Reply via email to