This is probably the most common question asked in this forum, as well on the web, regarding Ajax. Do a search and you will find hundreds, if not thousands of solutions.
One of the easiest, should you adopt jQuery to do you Ajax for you (highly recommended), is to use the jQuery load() method as follows:
where /fetchCities is a server-side resource (perhaps using Servlets and JSP -- which I know you know) that returns the formatted HTML options elements.
But looking around, you'll find that there are many different ways to do this.
you can use freely use ajax technology so that you send request for server,and get a list of cities related to that state and put that all cities in the choice box using java script.This is the best solution among all after ajax technology came.