you can use a filter to see if the referring page is your form and then
allow the download or redirect to your form appropriately. Alternatively,
you could set a value in the session that is only set by your form
submission that your filter can look for.

I do a similar thing in a filter where I verify a form has been filled out
by checking the database for the user. I also enforce a login to do this,
but you don't need to if you just put something in the session. 

Charlie

> -----Original Message-----
> From: Alex Short [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 11, 2002 12:36 PM
> To: Tomcat Users List
> Subject: Re: How to hide a download file
> 
> 
> Certainly not the most elegant solution but you could keep 
> the real file 
> in a unreachable location, and upon submitting it copy's the 
> file to a 
> cookie_date_time_filename.ext and has them download that.  
> Then you run a 
> cleaner script to erase these temp files after 24 hours.
> 
> Alex
> 
>  > 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