This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Here's another good explanation from http://www.esus.com/javaindex/j2ee/servlets/servletdogetdopost.html When you invoke a Servlet, the servlet engine passes the information on to the Servlets service() method. This method determines the type of request made (GET, POST, HEAD, ...) and calls the function doTYPE, like doGet, doPost. GET and POST just differ in the way form data is sent from the browser to the server. The method doGet handles data that has been attached to the url in the form url questionmark (name=value ampersand)+. Typically in a CGI you would have to read the environment variable QUERY_STRING to get this string of concatenated parameternames and values. With the doPost method, form data comes in through standard input stream, a cgi would just need to open the input stream and read until EOF to get the form data. With Servlets, you don't need to read in the concatenated string of parameternames and values. The parsing is all done behind the scenes. You just need to call getParameter regardless of how the form data is actually sent in.