Re: how to use jsp / servlet
First, Servlets it's better if they are in a package, not in the "default" package.
Originally Posted by game06
Second, you must map, into the web.xml, the url /servlet (or whatever url you would like to specify in the action attribute) to your servlet. It's not automatic. Putting action="servlet" doesn't mean, automatically, that a servlet named "servlet" is invoked!
Third, in the "good" use of JSP/Servlet, a Servlet should not do output directly to the response. At most it should do a redirect or a forward to another internal resource (e.g. a JSP, tipically).
Fourth (not less important), since the form is submitted in POST, your servlet must handle this request in the doPost, not doGet.