Exercise 5: Servlet that Creates
Cookies and Servlet that accepts Cookies
due April 24
- You will create two Servlets, the first called myCreateUserCookie
and another called myReadUserCookie.
- About myCreateUserCookie:
- It should be invoked with the Enter button on the HTML form
below is hit by the client.
- You will copy this form into your own HTML page to post in your
account.
- This servlet will read in all of the parameters posted from
the from to it.
- It will create Three Cookies with the following names and values:
1) name = UserCookieName, value = the value entered
into the form after Enter Name
2) name = UserCookieHandle, value = the value entered
into the form after Enter Handle
3) name = UserCookieEmail, value = the value entered
into the form after Enter Email
- About myReadUserCookie:
- It should be placed in a directory on the server such that it
will recieve the three cookies generated by the myCreateUserCookie
Servlet.
- It should be read in the values for the 3 Cookies: UserCookieName,
UserCookieHandle, and UserCookieEmail.
- It should generate a new web-page that welcomes the user by
their name, and tell them that currently the values of their handle
and email.
Post your work to your server
account and test, then SHOW your work to your instructor for recording
towards grade.
|