You cannot expect to figure out how to accomplish this task without
at least downloading the Servlet API.
I'd also recommend you go through Sun's Servlet tutorial.
Sun Servlet Tutorial You will have to understand how the request object is used to retrieve HTML form data.
You know the name of the fields you want to retrieve data from. Look up the method getParameter( java.lang.String ) and you'll be able to figure out how to do this.