i am new to jsp and mysql.

i have java class employee
int id[];
string name[];
string states[]
string cities[]
string area[]

i have mysql emloyee table with the values in database.i need to retreive emp name based on state city area.


i have created employee class with set and get methods.

i have designed my jsp page with 4 drop down list ; states[] cities[] area[] emp name[] .

i have done my jdbc connection wich works fine.

can anyone tell how how to create dependent dropdown list in jsp.

what query should i write and create dependent drop down list .

my first list should have all states.

2nd should display all cities based on selection of states.

3 rd should display all areas in that city.

4th should display all employee name from that area.

can anyone help with how to query this table and link them to create dependent dropdown list in jsp page i am struck here .

i am supposed to use java jsp mysql.