Wednesday, April 8, 2009

Using POST to Send Form Data to a Servlet

Ajax is a great way to make your pages more dynamic. When using ajax, it's common to send data to your servlet in url-encoded form using a GET request. But there can actually be issues with sending information in GET requests. It's generally better practice to send data as a POST request, but there's one subtle detail required to make it work.