-3

I am trying to create a customer feedback management program in which a link to a page is sent to customer. The link sent to each customer is different(but each customer should land on the same page as it clicks the link) so that no non customer can use the link and each link expires as soon as the customer uses that link( same case as when you try to change Oracle Corporation password).The url(link) should be so that each customer's social security number e.g "35202-6641939-8" and customer's tracking id e.g "10901540381" are combined and then encrypted and then appended to the url(link) which is e-mailed to the customer. But even though the url of each customer is different , even then each customer should land on the same page. My priority is that a Java component(servlet) which handles the above mentioned scenario be created. But don't know how to implement the above mentioned scenario.

Regards!.

1 Answers1

2

Here's an idea:

When you create the link, generate some UUID (see UUID.randomUUID()) and put the uuid, the SSN and the tracking ID in some DB (a file could do the job if you really can't use a DB). => The link for the customer http://www.foo.com/somepath/<UUID> (the servlet is mapped to /somepath/* in this example)

Now the customer click the link, you get the DB record using the UUID, and you then have the SSN and tracking ID. Do something then purge the DB record (side note, you probably want some "batch" to purge old, non used links)

No encryption required.

  • The whole concept of disabling the link when the customer clicks is about as user friendly as a hedgehog travelling at an appreciable proportion of `c`. The number of times I've accidentally closed a page or navigated away; and now I have to get a new link... – Boris the Spider Nov 01 '16 at 17:06
  • Let me reverse purge and do something :) –  Nov 01 '16 at 17:07
  • Have you ever changed password for Oracle website. They sent you a link and the link expires. Each time you change the password . They send you a different link , but each different link lands on the same page. I am trying to create that kind of thing . I hope that a servlet must be able to handle above mentioned scenario. But don't know how. – Usman_Enterprise_Developer Nov 01 '16 at 17:18
  • every time you call randomUUID you get a different uuid. For the servlet, you can map the servlet using wildcard, see http://stackoverflow.com/questions/12972914/wildcard-path-for-servlet for example –  Nov 01 '16 at 17:20
  • Haven't yet received any sensible answer to the question yet. – Usman_Enterprise_Developer Nov 01 '16 at 17:58