0

I am curious about how it works when a user is trying to create an account on a website. Does the website use a session or cookie or even MVC to create the account, store it in the database?

I am not sure if session is too much to use for user account creation which includes certain validations (e.g. password needs to be of a complexity). Or would a cookie be sufficient?

I have read the following post but am still not sure on how to go about it to be efficient in my coding.

Session or cookie confusion

Differences between cookies and sessions?

Note: I am using eclipse and Tomcat 8

Community
  • 1
  • 1
Kode.Error404
  • 573
  • 5
  • 24

1 Answers1

0

you can do by :

1/ creating a jsp page (view) where you put a form for user

2/ creating a java class(model) where you put a method that connect to database and insert data (example NewAccount(String username,String password,...){...})

3/ create a servlet(controller) to get data (name , password ...) from the form and pass it to the model by calling a method

Taha
  • 1,072
  • 2
  • 16
  • 29