How do I convert my existing applets and/or CGI programs to servlets?
I'm not really sure how/why you would convert an applet to a servlet. Applets are small applications that run on a client computer, typically with a GUI interface. Servlets process request to a server. So there doesn't seem to be a clear way/reason to convert an applet to a servlet.
CGI scripts and servlets do basically the same job - back end processing on a server. Basically, all you have to do is alter any web pages that post to a CGI script to now post to a corresponding servlet. Then you would simply have the servlet perform the same processing that the CGI script did.