Hello Guys, I am about to start on this module below. I have asked this I think a month ago and only after finishing the rest of my small website will I implement this. Anyway im on track on learning the token creation for struts and the quartzs plugin. I was wondering if I will be sending the file streaming or I can just have a forward in my action mapping that would serialized the file?
Thanks in advance Richard On Wed, 13 Oct 2004 10:12:38 -0700, Wiebe de Jong <[EMAIL PROTECTED]> wrote: > The only way to make a link go away is to make it dynamic. That means that > the link you email will have to be to an action that returns the file. There > have been quite a few threads recently on this mailing list about how to get > actions to return files, including .pdf and .csv, so I won't cover that > here. > > Here is a list of steps for how I would go about implementing this feature: > > 1 - generate a unique token and store it in the database with a > timestamp=now() and status=valid. > 2 - add this token to the url you send in the email: > http://www.mycompany.com/myapp/download.do?token=123abc > 3 - when the user calls the action via the supplied url, the action checks > the database to see if the token is still valid. > 4 - if token is valid, send the file, and then invalidate the token so it > can't be used again. (status=used) > 5 - if token not valid, display a message to the user telling them that the > link has either expired or already been used. > 6 - have a background process run periodically (1 per day, every hour, > whatever) that checks the timestamps in the database and expires tokens if > the timestamp is more than 24 hours old. (status=expired) > > The background process can be run via Quartz, which was also covered > recently in this list. > > Wiebe de Jong > > > > -----Original Message----- > From: Richard [mailto:[EMAIL PROTECTED] > Sent: Wednesday, October 13, 2004 2:14 AM > To: Struts Users Mailing List > Subject: sending/maintaning a download link > > hi guys, > > how do i do this in struts? > > i want to send a download link ( via email - resolved ) to a newly > registered user and that download link will expire after 24hrs. > > is there and apache project for this? > > please help > > thanks in advance > richard > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]