title: ajax + servlet country state city list
body: <p>I am trying to populate city, country and statelist using ajax, and servlets.
  Now I know how to get the XMLhttpRequest object. There is a standard mechanism to do that and depending on the cross browser compatibility, you do get a ActiveX or a xml object..</p>
  
  <p>Then you send a request to the <em>actionservlet</em>, using <code>xmlhttprequest.open()</code> and you send the request and you have an event handler function to take care of onreadystatechange issue, Now, when it comes to receiving the response, I get an error stating that the response is not completely received, i.e the status <code>!= 4</code>... now.</p>
  
  <p>I was wondering, how does the entire mechanism work..</p>
  
  <p>how to put the parameters in the request, send it to servlet, and then I know how to retreieve the param from the URL.. but then how to send a valid response...??</p>
  
  <p>I am confused on the ajax part, because I am not using / not use PHP. It is harder to think. Please suggest what should be done.</p>
  
  <p>Is there any easier way to populate a city, country and state list??</p>