-3

I am developing e-commerce application. my strategy is that when the user clicks on BUY NOW button,she is redirected to the signup/login page. Here she enters an email id and password combination for authentication. After she press the submit button, an e-mail should be sent to the email id provided with a randomly generated confirmation code. in the next page of my application, the user must enter the confirmation code sent to the email. Only after verification of this code, she would be proceeded to the next page. i am using JSP/Servlet with Java Beans(EJB); Please help me to write the code for this strategy. Thank you all.

Anjan Sarma
  • 1
  • 1
  • 4
  • 2
    Hi there, welcome to stack overflow! It's hard to answer a question that's so broad, and a broad answer wouldn't necessarily be useful to others. Try to figure out how to get started, then come back and ask a more specific question when you get stuck. – Denise Oct 26 '14 at 18:20
  • What Denise said. More to the point: Don't expect anyone here to write code for you. – Felix Frank Oct 26 '14 at 20:36
  • Check [How send automatic reply on particular email id when an user registers?](http://stackoverflow.com/q/5431061/573032) – Roman C Oct 26 '14 at 20:59

1 Answers1

1

Your question is too broad . you should narrow down your approach. Split it into modules.

  1. Create a servlet to retrieve the userid and the password .

  2. Write the Java class to generate the random passwords with the email id you retrieve or you may follow other approaches also to generate random numbers.

  3. Send the mail using Java mail (you can configure the mail servers or you could use the existing ones too). Store the random generared values to the database.

  4. Once the mail is received at users end .prompt them to enter the code and validate from database .allow the activation process.

Hope this helps!!

Santhosh
  • 8,181
  • 4
  • 29
  • 56