your filter. it should look at the session and see that
'formfilledout=false' and redirect to the form without serving the file(call
response.redirect() instead of doChain()).

Charlie

> -----Original Message-----
> From: Kevin Passey [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 11, 2002 12:44 PM
> To: 'Tomcat Users List'
> Subject: RE: How to hide a download file
> 
> 
> I was thinking of setting something in the session for the 
> download page
> anyway which would direct a user back to the form.
> 
> But if I create a directory called "downloads" and put the 
> file in there -
> what's to stop someone just typing the folder URL and 
> grabbing the file?
> 
> Thanks everyone for your input.
> 
> Kevin
> 
> -----Original Message-----
> From: Cox, Charlie [mailto:[EMAIL PROTECTED]]
> Sent: 11 July 2002 17:46
> To: 'Tomcat Users List'
> Subject: RE: How to hide a download file
> 
> 
> 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]>
> 
> --
> 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