Hi! everyone, What is difference between GET and POST in Servelets? thanks ss
Joined: Jan 30, 2002
Using "get" to pass information sends the information appended to the request for the processing page. It tends to be simpler and you can troubleshoot any problems simply by looking at the address bar in your browser since all values passed are displayed there. This is also the primary weakness of this method. The data being passed is visible and is limited in size to the maximum length of a request string. Using "post" to pass information sends the information embedded in a header during the request for the processing page. It's main advantage is that you can send larger amounts of information. It also doesn't make that information visible in the address bar of the browser which is nice if you are using the "hidden" input type. The value of this type is still readily available to the user by using view source, but the average user won't see it or be confused by any information you may need to pass from your form for processing.
Go through the link below to learn details regarding get and post in servlets
They are two different types of request that the browser can make of the server. Many servlets respond to them in the same manner. One of the primary differences between a GET and a POST is the manner in which request parameters are passed. In a GET, the parameters are part of the query string, and hence part of the URL (the length of which is limited). A POST passes the parameters as a data stream. From the point of view of the servlet, this distinction usually doesn't matter; the method request.getParameter() is used regardless of the mechanism. hth, bear