A servlet can be run from a browser on a remote computer, whereas an application cannot.
A servlet container is a program that runs on a server that is capable of running servlets. Often, the servlet container is installed automatically with the Web server software.
The HTTPServlet class can only process HTTP requests. If you are using another protocol, you must use the GenericServlet class.
A session object stores the values of a servlet's variables on the server. This enables the state of the user's session to be maintained for a period of time.
A cookie stores the state information in the user's browser. The Session object stores the same information, but on the server itself.