Processing HTTP requests
The doPost method is required to open an InputStream to get the parameters, however, it can call a method parsePostData, that returns a Hashtable with the names and values of the parameters.
To create a cookie on the browser, you create an object of type Cookie and use res.addCookie( c) to send it to the browser. Cookies are retrieved by using methods getCookies, and getName and getValue for individual cookies.
There is also a special HPPTSession class that implicitly uses cookies to allow you to save session information as name/value pairs in between requests.