How to create Cookie for login function
I do have this activity of mine where we have something like a 'username' and 'password'. function. the idea is, once you've inputted data for username and password in the login page, you just need to incorporate the user with cookies - upon clicking the submit button.
Here's the thing. once he logged in once and closed the browser, and if he decides to enter your page, he can automatically logged in that page.
Here's a simplified workflow (of how it should look like)
1. Login username and password (Login.java)
2. Upon clicking submit, cookies will be created.
3. The page will proceed to the welcome page (via Welcome.java)
4. Close the browser
5. Open the browser
6. Upon typing the URL path (http://localhost:8080/myCookies/login), the page will automatically go to the Welcome part (http://localhost:8080/myCookies/welcome)**
** it looks like signing in a site like myspace then you close the browser, then you open it, your profile is still logged on
** the idea here is, the username and the password details are somehow 'controlled' in the .xml file